Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit feb8254

Browse files
committed
Improve style guideline compliance of assorted error-report messages.
Per the project style guide, details and hints should have leading capitalization and end with a period. On the other hand, errcontext should not be capitalized and should not end with a period. To support well formatted error contexts in dblink, extend dblink_res_error() to take a format+arguments rather than a hardcoded string. Daniel Gustafsson Discussion: https://postgr.es/m/B3C002C8-21A0-4F53-A06E-8CAB29FCF295@yesql.se
1 parent 88ba0ae commit feb8254

File tree

9 files changed

+75
-47
lines changed

9 files changed

+75
-47
lines changed

contrib/dblink/dblink.c

Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static char *generate_relation_name(Relation rel);
113113
static void dblink_connstr_check(const char *connstr);
114114
static void dblink_security_check(PGconn *conn, remoteConn *rconn);
115115
static void dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
116-
const char *dblink_context_msg, bool fail);
116+
bool fail, const char *fmt,...) pg_attribute_printf(5, 6);
117117
static char *get_connect_string(const char *servername);
118118
static char *escape_param_str(const char *from);
119119
static void validate_pkattnums(Relation rel,
@@ -441,7 +441,8 @@ dblink_open(PG_FUNCTION_ARGS)
441441
res = PQexec(conn, buf.data);
442442
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK)
443443
{
444-
dblink_res_error(conn, conname, res, "could not open cursor", fail);
444+
dblink_res_error(conn, conname, res, fail,
445+
"while opening cursor \"%s\"", curname);
445446
PG_RETURN_TEXT_P(cstring_to_text("ERROR"));
446447
}
447448

@@ -509,7 +510,8 @@ dblink_close(PG_FUNCTION_ARGS)
509510
res = PQexec(conn, buf.data);
510511
if (!res || PQresultStatus(res) != PGRES_COMMAND_OK)
511512
{
512-
dblink_res_error(conn, conname, res, "could not close cursor", fail);
513+
dblink_res_error(conn, conname, res, fail,
514+
"while closing cursor \"%s\"", curname);
513515
PG_RETURN_TEXT_P(cstring_to_text("ERROR"));
514516
}
515517

@@ -612,8 +614,8 @@ dblink_fetch(PG_FUNCTION_ARGS)
612614
(PQresultStatus(res) != PGRES_COMMAND_OK &&
613615
PQresultStatus(res) != PGRES_TUPLES_OK))
614616
{
615-
dblink_res_error(conn, conname, res,
616-
"could not fetch from cursor", fail);
617+
dblink_res_error(conn, conname, res, fail,
618+
"while fetching from cursor \"%s\"", curname);
617619
return (Datum) 0;
618620
}
619621
else if (PQresultStatus(res) == PGRES_COMMAND_OK)
@@ -763,8 +765,8 @@ dblink_record_internal(FunctionCallInfo fcinfo, bool is_async)
763765
if (PQresultStatus(res) != PGRES_COMMAND_OK &&
764766
PQresultStatus(res) != PGRES_TUPLES_OK)
765767
{
766-
dblink_res_error(conn, conname, res,
767-
"could not execute query", fail);
768+
dblink_res_error(conn, conname, res, fail,
769+
"while executing query");
768770
/* if fail isn't set, we'll return an empty query result */
769771
}
770772
else
@@ -1009,8 +1011,8 @@ materializeQueryResult(FunctionCallInfo fcinfo,
10091011
PGresult *res1 = res;
10101012

10111013
res = NULL;
1012-
dblink_res_error(conn, conname, res1,
1013-
"could not execute query", fail);
1014+
dblink_res_error(conn, conname, res1, fail,
1015+
"while executing query");
10141016
/* if fail isn't set, we'll return an empty query result */
10151017
}
10161018
else if (PQresultStatus(res) == PGRES_COMMAND_OK)
@@ -1438,8 +1440,8 @@ dblink_exec(PG_FUNCTION_ARGS)
14381440
(PQresultStatus(res) != PGRES_COMMAND_OK &&
14391441
PQresultStatus(res) != PGRES_TUPLES_OK))
14401442
{
1441-
dblink_res_error(conn, conname, res,
1442-
"could not execute command", fail);
1443+
dblink_res_error(conn, conname, res, fail,
1444+
"while executing command");
14431445

14441446
/*
14451447
* and save a copy of the command status string to return as our
@@ -1980,7 +1982,7 @@ dblink_fdw_validator(PG_FUNCTION_ARGS)
19801982
ereport(ERROR,
19811983
(errcode(ERRCODE_FDW_OUT_OF_MEMORY),
19821984
errmsg("out of memory"),
1983-
errdetail("could not get libpq's default connection options")));
1985+
errdetail("Could not get libpq's default connection options.")));
19841986
}
19851987

19861988
/* Validate each supplied option. */
@@ -2676,9 +2678,17 @@ dblink_connstr_check(const char *connstr)
26762678
}
26772679
}
26782680

2681+
/*
2682+
* Report an error received from the remote server
2683+
*
2684+
* res: the received error result (will be freed)
2685+
* fail: true for ERROR ereport, false for NOTICE
2686+
* fmt and following args: sprintf-style format and values for errcontext;
2687+
* the resulting string should be worded like "while <some action>"
2688+
*/
26792689
static void
26802690
dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
2681-
const char *dblink_context_msg, bool fail)
2691+
bool fail, const char *fmt,...)
26822692
{
26832693
int level;
26842694
char *pg_diag_sqlstate = PQresultErrorField(res, PG_DIAG_SQLSTATE);
@@ -2691,7 +2701,8 @@ dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
26912701
char *message_detail;
26922702
char *message_hint;
26932703
char *message_context;
2694-
const char *dblink_context_conname = "unnamed";
2704+
va_list ap;
2705+
char dblink_context_msg[512];
26952706

26962707
if (fail)
26972708
level = ERROR;
@@ -2720,21 +2731,38 @@ dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
27202731
if (message_primary == NULL)
27212732
message_primary = pchomp(PQerrorMessage(conn));
27222733

2734+
/*
2735+
* Now that we've copied all the data we need out of the PGresult, it's
2736+
* safe to free it. We must do this to avoid PGresult leakage. We're
2737+
* leaking all the strings too, but those are in palloc'd memory that will
2738+
* get cleaned up eventually.
2739+
*/
27232740
if (res)
27242741
PQclear(res);
27252742

2726-
if (conname)
2727-
dblink_context_conname = conname;
2743+
/*
2744+
* Format the basic errcontext string. Below, we'll add on something
2745+
* about the connection name. That's a violation of the translatability
2746+
* guidelines about constructing error messages out of parts, but since
2747+
* there's no translation support for dblink, there's no need to worry
2748+
* about that (yet).
2749+
*/
2750+
va_start(ap, fmt);
2751+
vsnprintf(dblink_context_msg, sizeof(dblink_context_msg), fmt, ap);
2752+
va_end(ap);
27282753

27292754
ereport(level,
27302755
(errcode(sqlstate),
27312756
message_primary ? errmsg_internal("%s", message_primary) :
27322757
errmsg("could not obtain message string for remote error"),
27332758
message_detail ? errdetail_internal("%s", message_detail) : 0,
27342759
message_hint ? errhint("%s", message_hint) : 0,
2735-
message_context ? errcontext("%s", message_context) : 0,
2736-
errcontext("Error occurred on dblink connection named \"%s\": %s.",
2737-
dblink_context_conname, dblink_context_msg)));
2760+
message_context ? (errcontext("%s", message_context)) : 0,
2761+
conname ?
2762+
(errcontext("%s on dblink connection named \"%s\"",
2763+
dblink_context_msg, conname)) :
2764+
(errcontext("%s on unnamed dblink connection",
2765+
dblink_context_msg))));
27382766
}
27392767

27402768
/*
@@ -2769,7 +2797,7 @@ get_connect_string(const char *servername)
27692797
ereport(ERROR,
27702798
(errcode(ERRCODE_FDW_OUT_OF_MEMORY),
27712799
errmsg("out of memory"),
2772-
errdetail("could not get libpq's default connection options")));
2800+
errdetail("Could not get libpq's default connection options.")));
27732801
}
27742802

27752803
/* first gather the server connstr options */

contrib/dblink/expected/dblink.out

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ WHERE t.a > 7;
155155
-- open a cursor with bad SQL and fail_on_error set to false
156156
SELECT dblink_open('rmt_foo_cursor','SELECT * FROM foobar',false);
157157
NOTICE: relation "foobar" does not exist
158-
CONTEXT: Error occurred on dblink connection named "unnamed": could not open cursor.
158+
CONTEXT: while opening cursor "rmt_foo_cursor" on unnamed dblink connection
159159
dblink_open
160160
-------------
161161
ERROR
@@ -223,7 +223,7 @@ FROM dblink_fetch('rmt_foo_cursor',4) AS t(a int, b text, c text[]);
223223
SELECT *
224224
FROM dblink_fetch('rmt_foobar_cursor',4,false) AS t(a int, b text, c text[]);
225225
NOTICE: cursor "rmt_foobar_cursor" does not exist
226-
CONTEXT: Error occurred on dblink connection named "unnamed": could not fetch from cursor.
226+
CONTEXT: while fetching from cursor "rmt_foobar_cursor" on unnamed dblink connection
227227
a | b | c
228228
---+---+---
229229
(0 rows)
@@ -238,7 +238,7 @@ SELECT dblink_exec('ABORT');
238238
-- close the wrong cursor
239239
SELECT dblink_close('rmt_foobar_cursor',false);
240240
NOTICE: cursor "rmt_foobar_cursor" does not exist
241-
CONTEXT: Error occurred on dblink connection named "unnamed": could not close cursor.
241+
CONTEXT: while closing cursor "rmt_foobar_cursor" on unnamed dblink connection
242242
dblink_close
243243
--------------
244244
ERROR
@@ -248,12 +248,12 @@ CONTEXT: Error occurred on dblink connection named "unnamed": could not close c
248248
SELECT *
249249
FROM dblink_fetch('rmt_foo_cursor',4) AS t(a int, b text, c text[]);
250250
ERROR: cursor "rmt_foo_cursor" does not exist
251-
CONTEXT: Error occurred on dblink connection named "unnamed": could not fetch from cursor.
251+
CONTEXT: while fetching from cursor "rmt_foo_cursor" on unnamed dblink connection
252252
-- this time, 'cursor "rmt_foo_cursor" not found' as a notice
253253
SELECT *
254254
FROM dblink_fetch('rmt_foo_cursor',4,false) AS t(a int, b text, c text[]);
255255
NOTICE: cursor "rmt_foo_cursor" does not exist
256-
CONTEXT: Error occurred on dblink connection named "unnamed": could not fetch from cursor.
256+
CONTEXT: while fetching from cursor "rmt_foo_cursor" on unnamed dblink connection
257257
a | b | c
258258
---+---+---
259259
(0 rows)
@@ -316,7 +316,7 @@ FROM dblink('SELECT * FROM foo') AS t(a int, b text, c text[]);
316316
SELECT *
317317
FROM dblink('SELECT * FROM foobar',false) AS t(a int, b text, c text[]);
318318
NOTICE: relation "foobar" does not exist
319-
CONTEXT: Error occurred on dblink connection named "unnamed": could not execute query.
319+
CONTEXT: while executing query on unnamed dblink connection
320320
a | b | c
321321
---+---+---
322322
(0 rows)
@@ -340,7 +340,7 @@ WHERE a = 11;
340340
-- botch a change to some other data
341341
SELECT dblink_exec('UPDATE foobar SET f3[2] = ''b99'' WHERE f1 = 11',false);
342342
NOTICE: relation "foobar" does not exist
343-
CONTEXT: Error occurred on dblink connection named "unnamed": could not execute command.
343+
CONTEXT: while executing command on unnamed dblink connection
344344
dblink_exec
345345
-------------
346346
ERROR
@@ -400,7 +400,7 @@ SELECT *
400400
FROM dblink('myconn','SELECT * FROM foobar',false) AS t(a int, b text, c text[])
401401
WHERE t.a > 7;
402402
NOTICE: relation "foobar" does not exist
403-
CONTEXT: Error occurred on dblink connection named "myconn": could not execute query.
403+
CONTEXT: while executing query on dblink connection named "myconn"
404404
a | b | c
405405
---+---+---
406406
(0 rows)
@@ -437,7 +437,7 @@ SELECT dblink_disconnect('myconn2');
437437
-- open a cursor incorrectly
438438
SELECT dblink_open('myconn','rmt_foo_cursor','SELECT * FROM foobar',false);
439439
NOTICE: relation "foobar" does not exist
440-
CONTEXT: Error occurred on dblink connection named "myconn": could not open cursor.
440+
CONTEXT: while opening cursor "rmt_foo_cursor" on dblink connection named "myconn"
441441
dblink_open
442442
-------------
443443
ERROR
@@ -523,7 +523,7 @@ SELECT dblink_close('myconn','rmt_foo_cursor');
523523
-- this should fail because there is no open transaction
524524
SELECT dblink_exec('myconn','DECLARE xact_test CURSOR FOR SELECT * FROM foo');
525525
ERROR: DECLARE CURSOR can only be used in transaction blocks
526-
CONTEXT: Error occurred on dblink connection named "myconn": could not execute command.
526+
CONTEXT: while executing command on dblink connection named "myconn"
527527
-- reset remote transaction state
528528
SELECT dblink_exec('myconn','ABORT');
529529
dblink_exec
@@ -573,7 +573,7 @@ FROM dblink_fetch('myconn','rmt_foo_cursor',4) AS t(a int, b text, c text[]);
573573
SELECT *
574574
FROM dblink_fetch('myconn','rmt_foobar_cursor',4,false) AS t(a int, b text, c text[]);
575575
NOTICE: cursor "rmt_foobar_cursor" does not exist
576-
CONTEXT: Error occurred on dblink connection named "myconn": could not fetch from cursor.
576+
CONTEXT: while fetching from cursor "rmt_foobar_cursor" on dblink connection named "myconn"
577577
a | b | c
578578
---+---+---
579579
(0 rows)
@@ -589,7 +589,7 @@ SELECT dblink_exec('myconn','ABORT');
589589
SELECT *
590590
FROM dblink_fetch('myconn','rmt_foo_cursor',4) AS t(a int, b text, c text[]);
591591
ERROR: cursor "rmt_foo_cursor" does not exist
592-
CONTEXT: Error occurred on dblink connection named "myconn": could not fetch from cursor.
592+
CONTEXT: while fetching from cursor "rmt_foo_cursor" on dblink connection named "myconn"
593593
-- close the named persistent connection
594594
SELECT dblink_disconnect('myconn');
595595
dblink_disconnect

contrib/file_fdw/file_fdw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ file_fdw_validator(PG_FUNCTION_ARGS)
277277
ereport(ERROR,
278278
(errcode(ERRCODE_SYNTAX_ERROR),
279279
errmsg("conflicting or redundant options"),
280-
errhint("option \"force_not_null\" supplied more than once for a column")));
280+
errhint("Option \"force_not_null\" supplied more than once for a column.")));
281281
force_not_null = def;
282282
/* Don't care what the value is, as long as it's a legal boolean */
283283
(void) defGetBoolean(def);
@@ -289,7 +289,7 @@ file_fdw_validator(PG_FUNCTION_ARGS)
289289
ereport(ERROR,
290290
(errcode(ERRCODE_SYNTAX_ERROR),
291291
errmsg("conflicting or redundant options"),
292-
errhint("option \"force_null\" supplied more than once for a column")));
292+
errhint("Option \"force_null\" supplied more than once for a column.")));
293293
force_null = def;
294294
(void) defGetBoolean(def);
295295
}

contrib/pgcrypto/px.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ px_THROW_ERROR(int err)
105105
ereport(ERROR,
106106
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
107107
errmsg("generating random data is not supported by this build"),
108-
errdetail("This functionality requires a source of strong random numbers"),
109-
errhint("You need to rebuild PostgreSQL using --enable-strong-random")));
108+
errdetail("This functionality requires a source of strong random numbers."),
109+
errhint("You need to rebuild PostgreSQL using --enable-strong-random.")));
110110
#endif
111111
}
112112
else

contrib/postgres_fdw/connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ pgfdw_report_error(int elevel, PGresult *res, PGconn *conn,
630630
message_detail ? errdetail_internal("%s", message_detail) : 0,
631631
message_hint ? errhint("%s", message_hint) : 0,
632632
message_context ? errcontext("%s", message_context) : 0,
633-
sql ? errcontext("Remote SQL command: %s", sql) : 0));
633+
sql ? errcontext("remote SQL command: %s", sql) : 0));
634634
}
635635
PG_CATCH();
636636
{

contrib/postgres_fdw/expected/postgres_fdw.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4126,7 +4126,7 @@ FETCH c;
41264126
SAVEPOINT s;
41274127
SELECT * FROM ft1 WHERE 1 / (c1 - 1) > 0; -- ERROR
41284128
ERROR: division by zero
4129-
CONTEXT: Remote SQL command: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8 FROM "S 1"."T 1" WHERE (((1 / ("C 1" - 1)) > 0))
4129+
CONTEXT: remote SQL command: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8 FROM "S 1"."T 1" WHERE (((1 / ("C 1" - 1)) > 0))
41304130
ROLLBACK TO s;
41314131
FETCH c;
41324132
c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8
@@ -5737,7 +5737,7 @@ ALTER TABLE "S 1"."T 1" ADD CONSTRAINT c2positive CHECK (c2 >= 0);
57375737
INSERT INTO ft1(c1, c2) VALUES(11, 12); -- duplicate key
57385738
ERROR: duplicate key value violates unique constraint "t1_pkey"
57395739
DETAIL: Key ("C 1")=(11) already exists.
5740-
CONTEXT: Remote SQL command: INSERT INTO "S 1"."T 1"("C 1", c2, c3, c4, c5, c6, c7, c8) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
5740+
CONTEXT: remote SQL command: INSERT INTO "S 1"."T 1"("C 1", c2, c3, c4, c5, c6, c7, c8) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
57415741
INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT DO NOTHING; -- works
57425742
INSERT INTO ft1(c1, c2) VALUES(11, 12) ON CONFLICT (c1, c2) DO NOTHING; -- unsupported
57435743
ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification
@@ -5746,11 +5746,11 @@ ERROR: there is no unique or exclusion constraint matching the ON CONFLICT spec
57465746
INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive
57475747
ERROR: new row for relation "T 1" violates check constraint "c2positive"
57485748
DETAIL: Failing row contains (1111, -2, null, null, null, null, ft1 , null).
5749-
CONTEXT: Remote SQL command: INSERT INTO "S 1"."T 1"("C 1", c2, c3, c4, c5, c6, c7, c8) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
5749+
CONTEXT: remote SQL command: INSERT INTO "S 1"."T 1"("C 1", c2, c3, c4, c5, c6, c7, c8) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
57505750
UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive
57515751
ERROR: new row for relation "T 1" violates check constraint "c2positive"
57525752
DETAIL: Failing row contains (1, -1, 00001_trig_update, 1970-01-02 08:00:00+00, 1970-01-02 00:00:00, 1, 1 , foo).
5753-
CONTEXT: Remote SQL command: UPDATE "S 1"."T 1" SET c2 = (- c2) WHERE (("C 1" = 1))
5753+
CONTEXT: remote SQL command: UPDATE "S 1"."T 1" SET c2 = (- c2) WHERE (("C 1" = 1))
57545754
-- Test savepoint/rollback behavior
57555755
select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
57565756
c2 | count
@@ -5909,7 +5909,7 @@ savepoint s3;
59095909
update ft2 set c2 = -2 where c2 = 42 and c1 = 10; -- fail on remote side
59105910
ERROR: new row for relation "T 1" violates check constraint "c2positive"
59115911
DETAIL: Failing row contains (10, -2, 00010_trig_update_trig_update, 1970-01-11 08:00:00+00, 1970-01-11 00:00:00, 0, 0 , foo).
5912-
CONTEXT: Remote SQL command: UPDATE "S 1"."T 1" SET c2 = (-2) WHERE ((c2 = 42)) AND (("C 1" = 10))
5912+
CONTEXT: remote SQL command: UPDATE "S 1"."T 1" SET c2 = (-2) WHERE ((c2 = 42)) AND (("C 1" = 10))
59135913
rollback to savepoint s3;
59145914
select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
59155915
c2 | count
@@ -6126,11 +6126,11 @@ RESET constraint_exclusion;
61266126
INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive
61276127
ERROR: new row for relation "T 1" violates check constraint "c2positive"
61286128
DETAIL: Failing row contains (1111, -2, null, null, null, null, ft1 , null).
6129-
CONTEXT: Remote SQL command: INSERT INTO "S 1"."T 1"("C 1", c2, c3, c4, c5, c6, c7, c8) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
6129+
CONTEXT: remote SQL command: INSERT INTO "S 1"."T 1"("C 1", c2, c3, c4, c5, c6, c7, c8) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
61306130
UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive
61316131
ERROR: new row for relation "T 1" violates check constraint "c2positive"
61326132
DETAIL: Failing row contains (1, -1, 00001_trig_update, 1970-01-02 08:00:00+00, 1970-01-02 00:00:00, 1, 1 , foo).
6133-
CONTEXT: Remote SQL command: UPDATE "S 1"."T 1" SET c2 = (- c2) WHERE (("C 1" = 1))
6133+
CONTEXT: remote SQL command: UPDATE "S 1"."T 1" SET c2 = (- c2) WHERE (("C 1" = 1))
61346134
ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c2positive;
61356135
-- But inconsistent check constraints provide inconsistent results
61366136
ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c2negative CHECK (c2 < 0);

contrib/postgres_fdw/option.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ InitPgFdwOptions(void)
196196
ereport(ERROR,
197197
(errcode(ERRCODE_FDW_OUT_OF_MEMORY),
198198
errmsg("out of memory"),
199-
errdetail("could not get libpq's default connection options")));
199+
errdetail("Could not get libpq's default connection options.")));
200200

201201
/* Count how many libpq options are available. */
202202
num_libpq_opts = 0;

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9328,7 +9328,7 @@ CreateRestartPoint(int flags)
93289328
ereport((log_checkpoints ? LOG : DEBUG2),
93299329
(errmsg("recovery restart point at %X/%X",
93309330
(uint32) (lastCheckPoint.redo >> 32), (uint32) lastCheckPoint.redo),
9331-
xtime ? errdetail("last completed transaction was at log time %s",
9331+
xtime ? errdetail("Last completed transaction was at log time %s.",
93329332
timestamptz_to_str(xtime)) : 0));
93339333

93349334
LWLockRelease(CheckpointLock);

src/backend/replication/logical/logical.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ CreateDecodingContext(XLogRecPtr start_lsn,
417417
ereport(LOG,
418418
(errmsg("starting logical decoding for slot \"%s\"",
419419
NameStr(slot->data.name)),
420-
errdetail("streaming transactions committing after %X/%X, reading WAL from %X/%X",
420+
errdetail("Streaming transactions committing after %X/%X, reading WAL from %X/%X.",
421421
(uint32) (slot->data.confirmed_flush >> 32),
422422
(uint32) slot->data.confirmed_flush,
423423
(uint32) (slot->data.restart_lsn >> 32),

0 commit comments

Comments
 (0)