aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/access/transam/twophase.c14
-rw-r--r--src/backend/access/transam/xlog.c2
-rw-r--r--src/backend/commands/publicationcmds.c2
-rw-r--r--src/backend/commands/statscmds.c10
-rw-r--r--src/backend/commands/tablecmds.c2
-rw-r--r--src/backend/commands/trigger.c2
-rw-r--r--src/backend/executor/execReplication.c4
-rw-r--r--src/backend/libpq/hba.c2
-rw-r--r--src/backend/replication/logical/relation.c5
-rw-r--r--src/backend/replication/logical/worker.c6
-rw-r--r--src/backend/replication/pgoutput/pgoutput.c2
-rw-r--r--src/backend/rewrite/rewriteDefine.c4
-rw-r--r--src/backend/storage/lmgr/predicate.c2
-rw-r--r--src/backend/utils/adt/int8.c8
-rw-r--r--src/backend/utils/adt/jsonfuncs.c6
-rw-r--r--src/backend/utils/adt/mac8.c4
-rw-r--r--src/backend/utils/adt/numutils.c12
-rw-r--r--src/backend/utils/adt/txid.c14
-rw-r--r--src/backend/utils/misc/guc.c6
-rw-r--r--src/backend/utils/time/snapmgr.c2
20 files changed, 54 insertions, 55 deletions
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c
index ba03d9687e5..ae832917ce2 100644
--- a/src/backend/access/transam/twophase.c
+++ b/src/backend/access/transam/twophase.c
@@ -2031,14 +2031,14 @@ ProcessTwoPhaseBuffer(TransactionId xid,
if (fromdisk)
{
ereport(WARNING,
- (errmsg("removing stale two-phase state file for \"%u\"",
+ (errmsg("removing stale two-phase state file for transaction %u",
xid)));
RemoveTwoPhaseFile(xid, true);
}
else
{
ereport(WARNING,
- (errmsg("removing stale two-phase state from shared memory for \"%u\"",
+ (errmsg("removing stale two-phase state from memory for transaction %u",
xid)));
PrepareRedoRemove(xid, true);
}
@@ -2051,14 +2051,14 @@ ProcessTwoPhaseBuffer(TransactionId xid,
if (fromdisk)
{
ereport(WARNING,
- (errmsg("removing future two-phase state file for \"%u\"",
+ (errmsg("removing future two-phase state file for transaction %u",
xid)));
RemoveTwoPhaseFile(xid, true);
}
else
{
ereport(WARNING,
- (errmsg("removing future two-phase state from memory for \"%u\"",
+ (errmsg("removing future two-phase state from memory for transaction %u",
xid)));
PrepareRedoRemove(xid, true);
}
@@ -2072,7 +2072,7 @@ ProcessTwoPhaseBuffer(TransactionId xid,
if (buf == NULL)
{
ereport(WARNING,
- (errmsg("removing corrupt two-phase state file for \"%u\"",
+ (errmsg("removing corrupt two-phase state file for transaction %u",
xid)));
RemoveTwoPhaseFile(xid, true);
return NULL;
@@ -2091,14 +2091,14 @@ ProcessTwoPhaseBuffer(TransactionId xid,
if (fromdisk)
{
ereport(WARNING,
- (errmsg("removing corrupt two-phase state file for \"%u\"",
+ (errmsg("removing corrupt two-phase state file for transaction %u",
xid)));
RemoveTwoPhaseFile(xid, true);
}
else
{
ereport(WARNING,
- (errmsg("removing corrupt two-phase state from memory for \"%u\"",
+ (errmsg("removing corrupt two-phase state from memory for transaction %u",
xid)));
PrepareRedoRemove(xid, true);
}
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 442341a707e..a3e8ce092fa 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -8658,7 +8658,7 @@ CreateCheckPoint(int flags)
LWLockRelease(CheckpointLock);
END_CRIT_SECTION();
ereport(DEBUG1,
- (errmsg("checkpoint skipped due to an idle system")));
+ (errmsg("checkpoint skipped because system is idle")));
return;
}
}
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c
index 610cb499d25..f298d3d381c 100644
--- a/src/backend/commands/publicationcmds.c
+++ b/src/backend/commands/publicationcmds.c
@@ -103,7 +103,7 @@ parse_publication_options(List *options,
if (!SplitIdentifierString(publish, ',', &publish_list))
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("invalid publish list")));
+ errmsg("invalid list syntax for \"publish\" option")));
/* Process the option list. */
foreach(lc, publish_list)
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 476505512b8..c70a28de4bc 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -180,7 +180,7 @@ CreateStatistics(CreateStatsStmt *stmt)
if (!HeapTupleIsValid(atttuple))
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_COLUMN),
- errmsg("column \"%s\" referenced in statistics does not exist",
+ errmsg("column \"%s\" does not exist",
attname)));
attForm = (Form_pg_attribute) GETSTRUCT(atttuple);
@@ -195,8 +195,8 @@ CreateStatistics(CreateStatsStmt *stmt)
if (type->lt_opr == InvalidOid)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("column \"%s\" cannot be used in statistics because its type has no default btree operator class",
- attname)));
+ errmsg("column \"%s\" cannot be used in statistics because its type %s has no default btree operator class",
+ attname, format_type_be(attForm->atttypid))));
/* Make sure no more than STATS_MAX_DIMENSIONS columns are used */
if (numcols >= STATS_MAX_DIMENSIONS)
@@ -242,7 +242,7 @@ CreateStatistics(CreateStatsStmt *stmt)
stxkeys = buildint2vector(attnums, numcols);
/*
- * Parse the statistics types.
+ * Parse the statistics kinds.
*/
build_ndistinct = false;
build_dependencies = false;
@@ -263,7 +263,7 @@ CreateStatistics(CreateStatsStmt *stmt)
else
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("unrecognized statistic type \"%s\"",
+ errmsg("unrecognized statistics kind \"%s\"",
type)));
}
/* If no statistic type was specified, build them all. */
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index d2167eda239..96354bdee55 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -13859,7 +13859,7 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd)
errmsg("table \"%s\" contains column \"%s\" not found in parent \"%s\"",
RelationGetRelationName(attachrel), attributeName,
RelationGetRelationName(rel)),
- errdetail("New partition should contain only the columns present in parent.")));
+ errdetail("The new partition may contain only the columns present in parent.")));
}
/*
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index bbfbc06db90..269c9e17dd1 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -416,7 +416,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString,
(TRIGGER_FOR_DELETE(tgtype) ? 1 : 0)) != 1)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("Transition tables cannot be specified for triggers with more than one event")));
+ errmsg("transition tables cannot be specified for triggers with more than one event")));
if (tt->isNew)
{
diff --git a/src/backend/executor/execReplication.c b/src/backend/executor/execReplication.c
index fbb81085124..5a75e0211fd 100644
--- a/src/backend/executor/execReplication.c
+++ b/src/backend/executor/execReplication.c
@@ -559,13 +559,13 @@ CheckCmdReplicaIdentity(Relation rel, CmdType cmd)
if (cmd == CMD_UPDATE && pubactions->pubupdate)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("cannot update table \"%s\" because it does not have replica identity and publishes updates",
+ errmsg("cannot update table \"%s\" because it does not have a replica identity and publishes updates",
RelationGetRelationName(rel)),
errhint("To enable updating the table, set REPLICA IDENTITY using ALTER TABLE.")));
else if (cmd == CMD_DELETE && pubactions->pubdelete)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("cannot delete from table \"%s\" because it does not have replica identity and publishes deletes",
+ errmsg("cannot delete from table \"%s\" because it does not have a replica identity and publishes deletes",
RelationGetRelationName(rel)),
errhint("To enable deleting from the table, set REPLICA IDENTITY using ALTER TABLE.")));
}
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 42afead9fd7..ba011b6d61b 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -1608,7 +1608,7 @@ verify_option_list_length(List *options, char *optionname, List *masters, char *
ereport(LOG,
(errcode(ERRCODE_CONFIG_FILE_ERROR),
- errmsg("the number of %s (%i) must be 1 or the same as the number of %s (%i)",
+ errmsg("the number of %s (%d) must be 1 or the same as the number of %s (%d)",
optionname,
list_length(options),
mastername,
diff --git a/src/backend/replication/logical/relation.c b/src/backend/replication/logical/relation.c
index 408143ae956..4b2d8a153ff 100644
--- a/src/backend/replication/logical/relation.c
+++ b/src/backend/replication/logical/relation.c
@@ -454,9 +454,8 @@ logicalrep_typmap_getid(Oid remoteid)
{
if (!get_typisdefined(remoteid))
ereport(ERROR,
- (errmsg("builtin type %u not found", remoteid),
- errhint("This can be caused by having publisher with "
- "higher major version than subscriber")));
+ (errmsg("built-in type %u not found", remoteid),
+ errhint("This can be caused by having a publisher with a higher PostgreSQL major version than the subscriber.")));
return remoteid;
}
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 041f3873b93..bc6d8246a71 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -629,7 +629,7 @@ check_relation_updatable(LogicalRepRelMapEntry *rel)
{
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("publisher does not send replica identity column "
+ errmsg("publisher did not send replica identity column "
"expected by the logical replication target relation \"%s.%s\"",
rel->remoterel.nspname, rel->remoterel.relname)));
}
@@ -844,7 +844,7 @@ apply_handle_delete(StringInfo s)
/* The tuple to be deleted could not be found. */
ereport(DEBUG1,
(errmsg("logical replication could not find row for delete "
- "in replication target %s",
+ "in replication target relation \"%s\"",
RelationGetRelationName(rel->localrel))));
}
@@ -910,7 +910,7 @@ apply_dispatch(StringInfo s)
default:
ereport(ERROR,
(errcode(ERRCODE_PROTOCOL_VIOLATION),
- errmsg("invalid logical replication message type %c", action)));
+ errmsg("invalid logical replication message type \"%c\"", action)));
}
}
diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c
index 67c1d3b246a..9ab954a6e01 100644
--- a/src/backend/replication/pgoutput/pgoutput.c
+++ b/src/backend/replication/pgoutput/pgoutput.c
@@ -115,7 +115,7 @@ parse_output_parameters(List *options, uint32 *protocol_version,
if (parsed > PG_UINT32_MAX || parsed < 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("proto_verson \"%s\" out of range",
+ errmsg("proto_version \"%s\" out of range",
strVal(defel->arg))));
*protocol_version = (uint32) parsed;
diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c
index d03984a2deb..071b3a9ec94 100644
--- a/src/backend/rewrite/rewriteDefine.c
+++ b/src/backend/rewrite/rewriteDefine.c
@@ -425,13 +425,13 @@ DefineQueryRewrite(char *rulename,
if (event_relation->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
- errmsg("could not convert partitioned table \"%s\" to a view",
+ errmsg("cannot convert partitioned table \"%s\" to a view",
RelationGetRelationName(event_relation))));
if (event_relation->rd_rel->relispartition)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
- errmsg("could not convert partition \"%s\" to a view",
+ errmsg("cannot convert partition \"%s\" to a view",
RelationGetRelationName(event_relation))));
snapshot = RegisterSnapshot(GetLatestSnapshot());
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 6a6d9d6d5cc..251a359bffc 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -1769,7 +1769,7 @@ GetSerializableTransactionSnapshotInt(Snapshot snapshot,
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("could not import the requested snapshot"),
- errdetail("The source process with pid %d is not running anymore.",
+ errdetail("The source process with PID %d is not running anymore.",
sourcepid)));
}
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index e8354dee44b..afa434cfee2 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -95,8 +95,8 @@ scanint8(const char *str, bool errorOK, int64 *result)
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for %s: \"%s\"",
- "integer", str)));
+ errmsg("invalid input syntax for integer: \"%s\"",
+ str)));
}
/* process digits */
@@ -130,8 +130,8 @@ gotdigits:
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for %s: \"%s\"",
- "integer", str)));
+ errmsg("invalid input syntax for integer: \"%s\"",
+ str)));
}
*result = (sign < 0) ? -tmp : tmp;
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index 619547d6bf5..68feeb2c5b5 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -2314,7 +2314,7 @@ populate_array_report_expected_array(PopulateArrayContext *ctx, int ndim)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("expected json array"),
- errhint("see the value of key \"%s\"", ctx->colname)));
+ errhint("See the value of key \"%s\".", ctx->colname)));
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
@@ -2336,13 +2336,13 @@ populate_array_report_expected_array(PopulateArrayContext *ctx, int ndim)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("expected json array"),
- errhint("see the array element %s of key \"%s\"",
+ errhint("See the array element %s of key \"%s\".",
indices.data, ctx->colname)));
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("expected json array"),
- errhint("see the array element %s",
+ errhint("See the array element %s.",
indices.data)));
}
}
diff --git a/src/backend/utils/adt/mac8.c b/src/backend/utils/adt/mac8.c
index 0410b9888af..1533cfdca0c 100644
--- a/src/backend/utils/adt/mac8.c
+++ b/src/backend/utils/adt/mac8.c
@@ -562,8 +562,8 @@ macaddr8tomacaddr(PG_FUNCTION_ARGS)
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("macaddr8 data out of range to convert to macaddr"),
errhint("Only addresses that have FF and FE as values in the "
- "4th and 5th bytes, from the left, for example: "
- "XX-XX-XX-FF-FE-XX-XX-XX, are eligible to be converted "
+ "4th and 5th bytes from the left, for example "
+ "xx:xx:xx:ff:fe:xx:xx:xx, are eligible to be converted "
"from macaddr8 to macaddr.")));
result->a = addr->a;
diff --git a/src/backend/utils/adt/numutils.c b/src/backend/utils/adt/numutils.c
index 07682723b78..244904ea940 100644
--- a/src/backend/utils/adt/numutils.c
+++ b/src/backend/utils/adt/numutils.c
@@ -48,8 +48,8 @@ pg_atoi(const char *s, int size, int c)
if (*s == 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for %s: \"%s\"",
- "integer", s)));
+ errmsg("invalid input syntax for integer: \"%s\"",
+ s)));
errno = 0;
l = strtol(s, &badp, 10);
@@ -58,8 +58,8 @@ pg_atoi(const char *s, int size, int c)
if (s == badp)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for %s: \"%s\"",
- "integer", s)));
+ errmsg("invalid input syntax for integer: \"%s\"",
+ s)));
switch (size)
{
@@ -102,8 +102,8 @@ pg_atoi(const char *s, int size, int c)
if (*badp && *badp != c)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for %s: \"%s\"",
- "integer", s)));
+ errmsg("invalid input syntax for integer: \"%s\"",
+ s)));
return (int32) l;
}
diff --git a/src/backend/utils/adt/txid.c b/src/backend/utils/adt/txid.c
index 5dd996f62c4..1e38ca2aa5e 100644
--- a/src/backend/utils/adt/txid.c
+++ b/src/backend/utils/adt/txid.c
@@ -132,8 +132,8 @@ TransactionIdInRecentPast(uint64 xid_with_epoch, TransactionId *extracted_xid)
|| (xid_epoch == now_epoch && xid > now_epoch_last_xid))
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("transaction ID " UINT64_FORMAT " is in the future",
- xid_with_epoch)));
+ errmsg("transaction ID %s is in the future",
+ psprintf(UINT64_FORMAT, xid_with_epoch))));
/*
* ShmemVariableCache->oldestClogXid is protected by CLogTruncationLock,
@@ -755,11 +755,11 @@ txid_status(PG_FUNCTION_ARGS)
Assert(TransactionIdIsValid(xid));
if (TransactionIdIsCurrentTransactionId(xid))
- status = gettext_noop("in progress");
+ status = "in progress";
else if (TransactionIdDidCommit(xid))
- status = gettext_noop("committed");
+ status = "committed";
else if (TransactionIdDidAbort(xid))
- status = gettext_noop("aborted");
+ status = "aborted";
else
{
/*
@@ -774,9 +774,9 @@ txid_status(PG_FUNCTION_ARGS)
* checked commit/abort status).
*/
if (TransactionIdPrecedes(xid, GetActiveSnapshot()->xmin))
- status = gettext_noop("aborted");
+ status = "aborted";
else
- status = gettext_noop("in progress");
+ status = "in progress";
}
}
else
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 969e80f7563..a05fb1a7eb3 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -2201,7 +2201,7 @@ static struct config_int ConfigureNamesInt[] =
{"max_pred_locks_per_relation", PGC_SIGHUP, LOCK_MANAGEMENT,
gettext_noop("Sets the maximum number of predicate-locked pages and tuples per relation."),
gettext_noop("If more than this total of pages and tuples in the same relation are locked "
- "by a connection, those locks are replaced by a relation level lock.")
+ "by a connection, those locks are replaced by a relation-level lock.")
},
&max_predicate_locks_per_relation,
-2, INT_MIN, INT_MAX,
@@ -2212,7 +2212,7 @@ static struct config_int ConfigureNamesInt[] =
{"max_pred_locks_per_page", PGC_SIGHUP, LOCK_MANAGEMENT,
gettext_noop("Sets the maximum number of predicate-locked tuples per page."),
gettext_noop("If more than this number of tuples on the same page are locked "
- "by a connection, those locks are replaced by a page level lock.")
+ "by a connection, those locks are replaced by a page-level lock.")
},
&max_predicate_locks_per_page,
2, 0, INT_MAX,
@@ -3608,7 +3608,7 @@ static struct config_string ConfigureNamesString[] =
{
{"ssl_dh_params_file", PGC_SIGHUP, CONN_AUTH_SECURITY,
- gettext_noop("Location of the SSL DH params file."),
+ gettext_noop("Location of the SSL DH parameters file."),
NULL,
GUC_SUPERUSER_ONLY
},
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 08a08c8e8fc..294ab705f1d 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -625,7 +625,7 @@ SetTransactionSnapshot(Snapshot sourcesnap, VirtualTransactionId *sourcevxid,
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("could not import the requested snapshot"),
- errdetail("The source process with pid %d is not running anymore.",
+ errdetail("The source process with PID %d is not running anymore.",
sourcepid)));
/*