diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2014-11-11 20:00:58 -0500 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2014-11-11 20:02:30 -0500 |
commit | 8339f33d68e08d24eb316971a0ac73af162d52b3 (patch) | |
tree | 2b0b5855c3a00935c928f95522ed5b4155f067bc /src/backend/replication | |
parent | f1abd78be7c7dc6fce7edaf9262998f3ca3d14be (diff) | |
download | postgresql-8339f33d68e08d24eb316971a0ac73af162d52b3.tar.gz postgresql-8339f33d68e08d24eb316971a0ac73af162d52b3.zip |
Message improvements
Diffstat (limited to 'src/backend/replication')
-rw-r--r-- | src/backend/replication/logical/logical.c | 4 | ||||
-rw-r--r-- | src/backend/replication/logical/reorderbuffer.c | 2 | ||||
-rw-r--r-- | src/backend/replication/logical/snapbuild.c | 17 | ||||
-rw-r--r-- | src/backend/replication/slot.c | 6 |
4 files changed, 16 insertions, 13 deletions
diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c index 49f9c7d3a57..875b89a6288 100644 --- a/src/backend/replication/logical/logical.c +++ b/src/backend/replication/logical/logical.c @@ -218,7 +218,7 @@ CreateInitDecodingContext(char *plugin, if (slot->data.database == InvalidOid) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("cannot use physical replication slot created for logical decoding"))); + errmsg("cannot use physical replication slot for logical decoding"))); if (slot->data.database != MyDatabaseId) ereport(ERROR, @@ -410,7 +410,7 @@ CreateDecodingContext(XLogRecPtr start_lsn, MemoryContextSwitchTo(old_context); ereport(LOG, - (errmsg("starting logical decoding for slot %s", + (errmsg("starting logical decoding for slot \"%s\"", NameStr(slot->data.name)), errdetail("streaming transactions committing after %X/%X, reading WAL from %X/%X", (uint32) (slot->data.confirmed_flush >> 32), diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index ab09296763a..ece1bc80640 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -2198,7 +2198,7 @@ ReorderBufferRestoreChanges(ReorderBuffer *rb, ReorderBufferTXN *txn, else if (readBytes != sizeof(ReorderBufferDiskChange)) ereport(ERROR, (errcode_for_file_access(), - errmsg("incomplete read from reorderbuffer spill file: read %d instead of %u bytes", + errmsg("could not read from reorderbuffer spill file: read %d instead of %u bytes", readBytes, (uint32) sizeof(ReorderBufferDiskChange)))); diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index 71c5fe2490a..705ee0b61c2 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -598,8 +598,10 @@ SnapBuildExportSnapshot(SnapBuild *builder) snapname = ExportSnapshot(snap); ereport(LOG, - (errmsg("exported logical decoding snapshot: \"%s\" with %u xids", - snapname, snap->xcnt))); + (errmsg_plural("exported logical decoding snapshot: \"%s\" with %u transaction ID", + "exported logical decoding snapshot: \"%s\" with %u transaction IDs", + snap->xcnt, + snapname, snap->xcnt))); return snapname; } @@ -901,7 +903,7 @@ SnapBuildEndTxn(SnapBuild *builder, XLogRecPtr lsn, TransactionId xid) ereport(LOG, (errmsg("logical decoding found consistent point at %X/%X", (uint32) (lsn >> 32), (uint32) lsn), - errdetail("xid %u finished, no running transactions anymore", + errdetail("Transaction ID %u finished; no more running transactions.", xid))); builder->state = SNAPBUILD_CONSISTENT; } @@ -1228,9 +1230,9 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn builder->initial_xmin_horizon)) { ereport(DEBUG1, - (errmsg("skipping snapshot at %X/%X while building logical decoding snapshot, xmin horizon too low", + (errmsg_internal("skipping snapshot at %X/%X while building logical decoding snapshot, xmin horizon too low", (uint32) (lsn >> 32), (uint32) lsn), - errdetail("initial xmin horizon of %u vs the snapshot's %u", + errdetail_internal("initial xmin horizon of %u vs the snapshot's %u", builder->initial_xmin_horizon, running->oldestRunningXid))); return true; } @@ -1324,7 +1326,10 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn ereport(LOG, (errmsg("logical decoding found initial starting point at %X/%X", (uint32) (lsn >> 32), (uint32) lsn), - errdetail("%u xacts need to finish", (uint32) builder->running.xcnt))); + errdetail_plural("%u transaction needs to finish.", + "%u transactions need to finish.", + builder->running.xcnt, + (uint32) builder->running.xcnt))); /* * Iterate through all xids, wait for them to finish. diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index 2c3ea555d09..7817ad8659e 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -797,8 +797,7 @@ CheckPointReplicationSlots(void) { int i; - ereport(DEBUG1, - (errmsg("performing replication slot checkpoint"))); + elog(DEBUG1, "performing replication slot checkpoint"); /* * Prevent any slot from being created/dropped while we're active. As we @@ -834,8 +833,7 @@ StartupReplicationSlots(void) DIR *replication_dir; struct dirent *replication_de; - ereport(DEBUG1, - (errmsg("starting up replication slots"))); + elog(DEBUG1, "starting up replication slots"); /* restore all slots by iterating over all on-disk entries */ replication_dir = AllocateDir("pg_replslot"); |