Skip to content

Commit edee0c6

Browse files
committed
Message style improvements
1 parent 894be11 commit edee0c6

File tree

23 files changed

+92
-87
lines changed

23 files changed

+92
-87
lines changed

src/backend/access/transam/varsup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ GetNewTransactionId(bool isSubXact)
153153
if (oldest_datname)
154154
ereport(ERROR,
155155
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
156-
errmsg("database is not accepting commands that assign new XIDs to avoid wraparound data loss in database \"%s\"",
156+
errmsg("database is not accepting commands that assign new transaction IDs to avoid wraparound data loss in database \"%s\"",
157157
oldest_datname),
158158
errhint("Execute a database-wide VACUUM in that database.\n"
159159
"You might also need to commit or roll back old prepared transactions, or drop stale replication slots.")));
160160
else
161161
ereport(ERROR,
162162
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
163-
errmsg("database is not accepting commands that assign new XIDs to avoid wraparound data loss in database with OID %u",
163+
errmsg("database is not accepting commands that assign new transaction IDs to avoid wraparound data loss in database with OID %u",
164164
oldest_datoid),
165165
errhint("Execute a database-wide VACUUM in that database.\n"
166166
"You might also need to commit or roll back old prepared transactions, or drop stale replication slots.")));
@@ -175,7 +175,7 @@ GetNewTransactionId(bool isSubXact)
175175
(errmsg("database \"%s\" must be vacuumed within %u transactions",
176176
oldest_datname,
177177
xidWrapLimit - xid),
178-
errhint("To avoid XID assignment failures, execute a database-wide VACUUM in that database.\n"
178+
errhint("To avoid transaction ID assignment failures, execute a database-wide VACUUM in that database.\n"
179179
"You might also need to commit or roll back old prepared transactions, or drop stale replication slots.")));
180180
else
181181
ereport(WARNING,

src/backend/access/transam/xact.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ AssignTransactionId(TransactionState s)
648648
if (IsInParallelMode() || IsParallelWorker())
649649
ereport(ERROR,
650650
(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
651-
errmsg("cannot assign XIDs during a parallel operation")));
651+
errmsg("cannot assign transaction IDs during a parallel operation")));
652652

653653
/*
654654
* Ensure parent(s) have XIDs, so that a child always has an XID later

src/backend/backup/basebackup_incremental.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ manifest_process_system_identifier(JsonManifestParseContext *context,
953953

954954
if (manifest_system_identifier != system_identifier)
955955
context->error_cb(context,
956-
"manifest system identifier is %llu, but database system identifier is %llu",
956+
"system identifier in backup manifest is %llu, but database system identifier is %llu",
957957
(unsigned long long) manifest_system_identifier,
958958
(unsigned long long) system_identifier);
959959
}

src/backend/commands/copyfromparse.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,15 +987,15 @@ NextCopyFrom(CopyFromState cstate, ExprContext *econtext,
987987

988988
attval = CopyLimitPrintoutLength(cstate->cur_attval);
989989
ereport(NOTICE,
990-
errmsg("skipping row due to data type incompatibility at line %llu for column %s: \"%s\"",
990+
errmsg("skipping row due to data type incompatibility at line %llu for column \"%s\": \"%s\"",
991991
(unsigned long long) cstate->cur_lineno,
992992
cstate->cur_attname,
993993
attval));
994994
pfree(attval);
995995
}
996996
else
997997
ereport(NOTICE,
998-
errmsg("skipping row due to data type incompatibility at line %llu for column %s: null input",
998+
errmsg("skipping row due to data type incompatibility at line %llu for column \"%s\": null input",
999999
(unsigned long long) cstate->cur_lineno,
10001000
cstate->cur_attname));
10011001

src/backend/commands/subscriptioncmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ CheckAlterSubOption(Subscription *sub, const char *option,
10981098
if (sub->enabled)
10991099
ereport(ERROR,
11001100
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1101-
errmsg("cannot set %s for enabled subscription",
1101+
errmsg("cannot set option \"%s\" for enabled subscription",
11021102
option)));
11031103

11041104
if (slot_needs_update)
@@ -1112,7 +1112,7 @@ CheckAlterSubOption(Subscription *sub, const char *option,
11121112
if (!sub->slotname)
11131113
ereport(ERROR,
11141114
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1115-
errmsg("cannot set %s for a subscription that does not have a slot name",
1115+
errmsg("cannot set option \"%s\" for a subscription that does not have a slot name",
11161116
option)));
11171117

11181118
/* The changed option of the slot can't be rolled back. */

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10713,7 +10713,7 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel)
1071310713
if (fk->confrelid == RelationGetRelid(partRel))
1071410714
ereport(ERROR,
1071510715
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
10716-
errmsg("can't attach table \"%s\" as a partition which is referenced by foreign key \"%s\"",
10716+
errmsg("cannot attach table \"%s\" as a partition because it is referenced by foreign key \"%s\"",
1071710717
RelationGetRelationName(partRel),
1071810718
get_constraint_name(fk->conoid))));
1071910719

src/backend/postmaster/walsummarizer.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,9 +752,11 @@ WaitForWalSummarization(XLogRecPtr lsn)
752752
current_time) / 1000;
753753
ereport(WARNING,
754754
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
755-
errmsg("still waiting for WAL summarization through %X/%X after %ld seconds",
756-
LSN_FORMAT_ARGS(lsn),
757-
elapsed_seconds),
755+
errmsg_plural("still waiting for WAL summarization through %X/%X after %ld second",
756+
"still waiting for WAL summarization through %X/%X after %ld seconds",
757+
elapsed_seconds,
758+
LSN_FORMAT_ARGS(lsn),
759+
elapsed_seconds),
758760
errdetail("Summarization has reached %X/%X on disk and %X/%X in memory.",
759761
LSN_FORMAT_ARGS(summarized_lsn),
760762
LSN_FORMAT_ARGS(pending_lsn))));

src/backend/replication/logical/logical.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ CreateDecodingContext(XLogRecPtr start_lsn,
539539
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
540540
errmsg("cannot use replication slot \"%s\" for logical decoding",
541541
NameStr(slot->data.name)),
542-
errdetail("This slot is being synchronized from the primary server."),
542+
errdetail("This replication slot is being synchronized from the primary server."),
543543
errhint("Specify another replication slot."));
544544

545545
/*

src/backend/replication/logical/slotsync.c

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ update_local_synced_slot(RemoteSlot *remote_slot, Oid remote_dbid,
212212
* impact the users, so we used DEBUG1 level to log the message.
213213
*/
214214
ereport(slot->data.persistency == RS_TEMPORARY ? LOG : DEBUG1,
215-
errmsg("could not sync slot \"%s\" as remote slot precedes local slot",
215+
errmsg("could not synchronize replication slot \"%s\" because remote slot precedes local slot",
216216
remote_slot->name),
217-
errdetail("Remote slot has LSN %X/%X and catalog xmin %u, but local slot has LSN %X/%X and catalog xmin %u.",
217+
errdetail("The remote slot has LSN %X/%X and catalog xmin %u, but the local slot has LSN %X/%X and catalog xmin %u.",
218218
LSN_FORMAT_ARGS(remote_slot->restart_lsn),
219219
remote_slot->catalog_xmin,
220220
LSN_FORMAT_ARGS(slot->data.restart_lsn),
@@ -456,7 +456,7 @@ drop_local_obsolete_slots(List *remote_slot_list)
456456
0, AccessShareLock);
457457

458458
ereport(LOG,
459-
errmsg("dropped replication slot \"%s\" of dbid %u",
459+
errmsg("dropped replication slot \"%s\" of database with OID %u",
460460
NameStr(local_slot->data.name),
461461
local_slot->data.database));
462462
}
@@ -576,8 +576,8 @@ update_and_persist_local_synced_slot(RemoteSlot *remote_slot, Oid remote_dbid)
576576
if (!found_consistent_snapshot)
577577
{
578578
ereport(LOG,
579-
errmsg("could not sync slot \"%s\"", remote_slot->name),
580-
errdetail("Logical decoding cannot find consistent point from local slot's LSN %X/%X.",
579+
errmsg("could not synchronize replication slot \"%s\"", remote_slot->name),
580+
errdetail("Logical decoding could not find consistent point from local slot's LSN %X/%X.",
581581
LSN_FORMAT_ARGS(slot->data.restart_lsn)));
582582

583583
return false;
@@ -586,7 +586,7 @@ update_and_persist_local_synced_slot(RemoteSlot *remote_slot, Oid remote_dbid)
586586
ReplicationSlotPersist();
587587

588588
ereport(LOG,
589-
errmsg("newly created slot \"%s\" is sync-ready now",
589+
errmsg("newly created replication slot \"%s\" is sync-ready now",
590590
remote_slot->name));
591591

592592
return true;
@@ -625,7 +625,7 @@ synchronize_one_slot(RemoteSlot *remote_slot, Oid remote_dbid)
625625
*/
626626
ereport(AmLogicalSlotSyncWorkerProcess() ? LOG : ERROR,
627627
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
628-
errmsg("skipping slot synchronization as the received slot sync"
628+
errmsg("skipping slot synchronization because the received slot sync"
629629
" LSN %X/%X for slot \"%s\" is ahead of the standby position %X/%X",
630630
LSN_FORMAT_ARGS(remote_slot->confirmed_lsn),
631631
remote_slot->name,
@@ -992,10 +992,9 @@ validate_remote_info(WalReceiverConn *wrconn)
992992
if (!primary_slot_valid)
993993
ereport(ERROR,
994994
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
995-
errmsg("slot synchronization requires valid primary_slot_name"),
996995
/* translator: second %s is a GUC variable name */
997-
errdetail("The replication slot \"%s\" specified by %s does not exist on the primary server.",
998-
PrimarySlotName, "primary_slot_name"));
996+
errmsg("replication slot \"%s\" specified by \"%s\" does not exist on primary server",
997+
PrimarySlotName, "primary_slot_name"));
999998

1000999
ExecClearTuple(tupslot);
10011000
walrcv_clear_result(res);
@@ -1022,9 +1021,13 @@ CheckAndGetDbnameFromConninfo(void)
10221021
if (dbname == NULL)
10231022
ereport(ERROR,
10241023
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1025-
/* translator: dbname is a specific option; %s is a GUC variable name */
1026-
errmsg("slot synchronization requires dbname to be specified in %s",
1027-
"primary_conninfo"));
1024+
1025+
/*
1026+
* translator: first %s is a connection option; second %s is a GUC
1027+
* variable name
1028+
*/
1029+
errmsg("replication slot synchronization requires \"%s\" to be specified in \"%s\"",
1030+
"dbname", "primary_conninfo"));
10281031
return dbname;
10291032
}
10301033

@@ -1044,7 +1047,7 @@ ValidateSlotSyncParams(int elevel)
10441047
if (wal_level < WAL_LEVEL_LOGICAL)
10451048
ereport(ERROR,
10461049
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1047-
errmsg("slot synchronization requires \"wal_level\" >= \"logical\""));
1050+
errmsg("replication slot synchronization requires \"wal_level\" >= \"logical\""));
10481051

10491052
/*
10501053
* A physical replication slot(primary_slot_name) is required on the
@@ -1057,7 +1060,7 @@ ValidateSlotSyncParams(int elevel)
10571060
ereport(elevel,
10581061
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
10591062
/* translator: %s is a GUC variable name */
1060-
errmsg("slot synchronization requires %s to be defined", "primary_slot_name"));
1063+
errmsg("replication slot synchronization requires \"%s\" to be set", "primary_slot_name"));
10611064
return false;
10621065
}
10631066

@@ -1071,7 +1074,7 @@ ValidateSlotSyncParams(int elevel)
10711074
ereport(elevel,
10721075
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
10731076
/* translator: %s is a GUC variable name */
1074-
errmsg("slot synchronization requires %s to be enabled",
1077+
errmsg("replication slot synchronization requires \"%s\" to be enabled",
10751078
"hot_standby_feedback"));
10761079
return false;
10771080
}
@@ -1085,7 +1088,7 @@ ValidateSlotSyncParams(int elevel)
10851088
ereport(elevel,
10861089
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
10871090
/* translator: %s is a GUC variable name */
1088-
errmsg("slot synchronization requires %s to be defined",
1091+
errmsg("replication slot synchronization requires \"%s\" to be set",
10891092
"primary_conninfo"));
10901093
return false;
10911094
}
@@ -1123,7 +1126,7 @@ slotsync_reread_config(void)
11231126
{
11241127
ereport(LOG,
11251128
/* translator: %s is a GUC variable name */
1126-
errmsg("slot sync worker will shutdown because %s is disabled", "sync_replication_slots"));
1129+
errmsg("replication slot synchronization worker will shut down because \"%s\" is disabled", "sync_replication_slots"));
11271130
proc_exit(0);
11281131
}
11291132

@@ -1132,7 +1135,7 @@ slotsync_reread_config(void)
11321135
(old_hot_standby_feedback != hot_standby_feedback))
11331136
{
11341137
ereport(LOG,
1135-
errmsg("slot sync worker will restart because of a parameter change"));
1138+
errmsg("replication slot synchronization worker will restart because of a parameter change"));
11361139

11371140
/*
11381141
* Reset the last-start time for this worker so that the postmaster
@@ -1156,7 +1159,7 @@ ProcessSlotSyncInterrupts(WalReceiverConn *wrconn)
11561159
if (ShutdownRequestPending)
11571160
{
11581161
ereport(LOG,
1159-
errmsg("slot sync worker is shutting down on receiving SIGINT"));
1162+
errmsg("replication slot synchronization worker is shutting down on receiving SIGINT"));
11601163

11611164
proc_exit(0);
11621165
}

src/backend/replication/pgoutput/pgoutput.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,11 @@ parse_output_parameters(List *options, PGOutputData *data)
404404
if (!protocol_version_given)
405405
ereport(ERROR,
406406
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
407-
errmsg("proto_version option missing"));
407+
errmsg("option \"%s\" missing", "proto_version"));
408408
if (!publication_names_given)
409409
ereport(ERROR,
410410
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
411-
errmsg("publication_names option missing"));
411+
errmsg("option \"%s\" missing", "publication_names"));
412412
}
413413

414414
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy