mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Message style improvements
This commit is contained in:
@@ -1320,7 +1320,7 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
|
||||
if (check_enable_rls(RelationGetRelid(rel), InvalidOid, false) == RLS_ENABLED)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("\"%s\" cannot replicate into relation with row-level security enabled: \"%s\"",
|
||||
errmsg("user \"%s\" cannot replicate into relation with row-level security enabled: \"%s\"",
|
||||
GetUserNameFromId(GetUserId(), true),
|
||||
RelationGetRelationName(rel))));
|
||||
|
||||
|
||||
@@ -1631,7 +1631,7 @@ TargetPrivilegesCheck(Relation rel, AclMode mode)
|
||||
if (check_enable_rls(relid, InvalidOid, false) == RLS_ENABLED)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("\"%s\" cannot replicate into relation with row-level security enabled: \"%s\"",
|
||||
errmsg("user \"%s\" cannot replicate into relation with row-level security enabled: \"%s\"",
|
||||
GetUserNameFromId(GetUserId(), true),
|
||||
RelationGetRelationName(rel))));
|
||||
}
|
||||
@@ -3788,7 +3788,7 @@ ApplyWorkerMain(Datum main_arg)
|
||||
}
|
||||
|
||||
ereport(DEBUG1,
|
||||
(errmsg("logical replication apply worker for subscription \"%s\" two_phase is %s",
|
||||
(errmsg_internal("logical replication apply worker for subscription \"%s\" two_phase is %s",
|
||||
MySubscription->name,
|
||||
MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_DISABLED ? "DISABLED" :
|
||||
MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_PENDING ? "PENDING" :
|
||||
@@ -3837,7 +3837,7 @@ DisableSubscriptionAndExit(void)
|
||||
|
||||
/* Notify the subscription has been disabled and exit */
|
||||
ereport(LOG,
|
||||
errmsg("logical replication subscription \"%s\" has been disabled due to an error",
|
||||
errmsg("subscription \"%s\" has been disabled because of an error",
|
||||
MySubscription->name));
|
||||
|
||||
proc_exit(0);
|
||||
@@ -3972,7 +3972,7 @@ clear_subscription_skip_lsn(XLogRecPtr finish_lsn)
|
||||
|
||||
if (myskiplsn != finish_lsn)
|
||||
ereport(WARNING,
|
||||
errmsg("skip-LSN of logical replication subscription \"%s\" cleared", MySubscription->name),
|
||||
errmsg("skip-LSN of subscription \"%s\" cleared", MySubscription->name),
|
||||
errdetail("Remote transaction's finish WAL location (LSN) %X/%X did not match skip-LSN %X/%X.",
|
||||
LSN_FORMAT_ARGS(finish_lsn),
|
||||
LSN_FORMAT_ARGS(myskiplsn)));
|
||||
@@ -3999,23 +3999,23 @@ apply_error_callback(void *arg)
|
||||
if (errarg->rel == NULL)
|
||||
{
|
||||
if (!TransactionIdIsValid(errarg->remote_xid))
|
||||
errcontext("processing remote data for replication origin \"%s\" during \"%s\"",
|
||||
errcontext("processing remote data for replication origin \"%s\" during message type \"%s\"",
|
||||
errarg->origin_name,
|
||||
logicalrep_message_type(errarg->command));
|
||||
else if (XLogRecPtrIsInvalid(errarg->finish_lsn))
|
||||
errcontext("processing remote data for replication origin \"%s\" during \"%s\" in transaction %u",
|
||||
errcontext("processing remote data for replication origin \"%s\" during message type \"%s\" in transaction %u",
|
||||
errarg->origin_name,
|
||||
logicalrep_message_type(errarg->command),
|
||||
errarg->remote_xid);
|
||||
else
|
||||
errcontext("processing remote data for replication origin \"%s\" during \"%s\" in transaction %u finished at %X/%X",
|
||||
errcontext("processing remote data for replication origin \"%s\" during message type \"%s\" in transaction %u, finished at %X/%X",
|
||||
errarg->origin_name,
|
||||
logicalrep_message_type(errarg->command),
|
||||
errarg->remote_xid,
|
||||
LSN_FORMAT_ARGS(errarg->finish_lsn));
|
||||
}
|
||||
else if (errarg->remote_attnum < 0)
|
||||
errcontext("processing remote data for replication origin \"%s\" during \"%s\" for replication target relation \"%s.%s\" in transaction %u finished at %X/%X",
|
||||
errcontext("processing remote data for replication origin \"%s\" during message type \"%s\" for replication target relation \"%s.%s\" in transaction %u, finished at %X/%X",
|
||||
errarg->origin_name,
|
||||
logicalrep_message_type(errarg->command),
|
||||
errarg->rel->remoterel.nspname,
|
||||
@@ -4023,7 +4023,7 @@ apply_error_callback(void *arg)
|
||||
errarg->remote_xid,
|
||||
LSN_FORMAT_ARGS(errarg->finish_lsn));
|
||||
else
|
||||
errcontext("processing remote data for replication origin \"%s\" during \"%s\" for replication target relation \"%s.%s\" column \"%s\" in transaction %u finished at %X/%X",
|
||||
errcontext("processing remote data for replication origin \"%s\" during message type \"%s\" for replication target relation \"%s.%s\" column \"%s\" in transaction %u, finished at %X/%X",
|
||||
errarg->origin_name,
|
||||
logicalrep_message_type(errarg->command),
|
||||
errarg->rel->remoterel.nspname,
|
||||
|
||||
@@ -518,9 +518,8 @@ ReadReplicationSlot(ReadReplicationSlotCmd *cmd)
|
||||
if (OidIsValid(slot_contents.data.database))
|
||||
ereport(ERROR,
|
||||
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot use \"%s\" with logical replication slot \"%s\"",
|
||||
"READ_REPLICATION_SLOT",
|
||||
NameStr(slot_contents.data.name)));
|
||||
errmsg("cannot use %s with a logical replication slot",
|
||||
"READ_REPLICATION_SLOT"));
|
||||
|
||||
/* slot type */
|
||||
values[i] = CStringGetTextDatum("physical");
|
||||
|
||||
Reference in New Issue
Block a user