aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/tablesync.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-03-31 15:25:53 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-03-31 15:25:53 -0400
commit6197db5340b8154adce1c6d07f6d3325547429c1 (patch)
tree56ace98b58720de30c2a9040d01f1a13f85a4f72 /src/backend/replication/logical/tablesync.c
parentdb973ffb3ca43e65a0bf15175a35184a53bf977d (diff)
downloadpostgresql-6197db5340b8154adce1c6d07f6d3325547429c1.tar.gz
postgresql-6197db5340b8154adce1c6d07f6d3325547429c1.zip
Improve style of some replication-related error messages.
Put the remote end's error message into the primary error string, instead of relegating it to errdetail(). Although this could end up being awkward if the remote sends us a really long error message, it seems more in keeping with our message style guidelines, and more helpful in situations where the errdetail could get dropped. Peter Smith Discussion: https://postgr.es/m/CAHut+Ps-Qv2yQceCwobQDP0aJOkfDzRFrOaR6+2Op2K=WHGeWg@mail.gmail.com
Diffstat (limited to 'src/backend/replication/logical/tablesync.c')
-rw-r--r--src/backend/replication/logical/tablesync.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c
index 8494db8f053..0638f5c7f87 100644
--- a/src/backend/replication/logical/tablesync.c
+++ b/src/backend/replication/logical/tablesync.c
@@ -1043,8 +1043,8 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
0, NULL);
if (res->status != WALRCV_OK_COMMAND)
ereport(ERROR,
- (errmsg("table copy could not start transaction on publisher"),
- errdetail("The error was: %s", res->err)));
+ (errmsg("table copy could not start transaction on publisher: %s",
+ res->err)));
walrcv_clear_result(res);
/*
@@ -1103,8 +1103,8 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
res = walrcv_exec(wrconn, "COMMIT", 0, NULL);
if (res->status != WALRCV_OK_COMMAND)
ereport(ERROR,
- (errmsg("table copy could not finish transaction on publisher"),
- errdetail("The error was: %s", res->err)));
+ (errmsg("table copy could not finish transaction on publisher: %s",
+ res->err)));
walrcv_clear_result(res);
table_close(rel, NoLock);