Re-run pgindent.
This is just to have a clean base state for testing of Piotr Stefaniak's latest version of FreeBSD indent. I fixed up a couple of places where pgindent would have changed format not-nicely. perltidy not included. Discussion: https://postgr.es/m/VI1PR03MB119959F4B65F000CA7CD9F6BF2CC0@VI1PR03MB1199.eurprd03.prod.outlook.com
This commit is contained in:
parent
096f1ccd52
commit
651902deb1
|
@ -356,7 +356,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
|
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
|
||||||
errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
|
errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
|
||||||
itemsz, BrinMaxItemSize, RelationGetRelationName(idxrel))));
|
itemsz, BrinMaxItemSize, RelationGetRelationName(idxrel))));
|
||||||
return InvalidOffsetNumber; /* keep compiler quiet */
|
return InvalidOffsetNumber; /* keep compiler quiet */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -265,8 +265,8 @@ brinvalidate(Oid opclassoid)
|
||||||
continue; /* got it */
|
continue; /* got it */
|
||||||
ereport(INFO,
|
ereport(INFO,
|
||||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||||
errmsg("operator class \"%s\" of access method %s is missing support function %d",
|
errmsg("operator class \"%s\" of access method %s is missing support function %d",
|
||||||
opclassname, "brin", i)));
|
opclassname, "brin", i)));
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,8 +244,8 @@ ginvalidate(Oid opclassoid)
|
||||||
continue; /* don't need both, see check below loop */
|
continue; /* don't need both, see check below loop */
|
||||||
ereport(INFO,
|
ereport(INFO,
|
||||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||||
errmsg("operator class \"%s\" of access method %s is missing support function %d",
|
errmsg("operator class \"%s\" of access method %s is missing support function %d",
|
||||||
opclassname, "gin", i)));
|
opclassname, "gin", i)));
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
if (!opclassgroup ||
|
if (!opclassgroup ||
|
||||||
|
|
|
@ -262,8 +262,8 @@ gistvalidate(Oid opclassoid)
|
||||||
continue; /* optional methods */
|
continue; /* optional methods */
|
||||||
ereport(INFO,
|
ereport(INFO,
|
||||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||||
errmsg("operator class \"%s\" of access method %s is missing support function %d",
|
errmsg("operator class \"%s\" of access method %s is missing support function %d",
|
||||||
opclassname, "gist", i)));
|
opclassname, "gist", i)));
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3463,7 +3463,7 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
|
||||||
(errmsg("index \"%s\" was reindexed",
|
(errmsg("index \"%s\" was reindexed",
|
||||||
get_rel_name(indexId)),
|
get_rel_name(indexId)),
|
||||||
errdetail_internal("%s",
|
errdetail_internal("%s",
|
||||||
pg_rusage_show(&ru0))));
|
pg_rusage_show(&ru0))));
|
||||||
|
|
||||||
/* Close rels, but keep locks */
|
/* Close rels, but keep locks */
|
||||||
index_close(iRel, NoLock);
|
index_close(iRel, NoLock);
|
||||||
|
|
|
@ -2648,8 +2648,8 @@ CopyFrom(CopyState cstate)
|
||||||
* tuple such that the partition constraint is no longer
|
* tuple such that the partition constraint is no longer
|
||||||
* satisfied, so we need to check in that case.
|
* satisfied, so we need to check in that case.
|
||||||
*/
|
*/
|
||||||
bool check_partition_constr =
|
bool check_partition_constr =
|
||||||
(resultRelInfo->ri_PartitionCheck != NIL);
|
(resultRelInfo->ri_PartitionCheck != NIL);
|
||||||
|
|
||||||
if (saved_resultRelInfo != NULL &&
|
if (saved_resultRelInfo != NULL &&
|
||||||
!(resultRelInfo->ri_TrigDesc &&
|
!(resultRelInfo->ri_TrigDesc &&
|
||||||
|
|
|
@ -1827,7 +1827,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
|
||||||
RelationGetRelationName(onerel),
|
RelationGetRelationName(onerel),
|
||||||
old_rel_pages, new_rel_pages),
|
old_rel_pages, new_rel_pages),
|
||||||
errdetail_internal("%s",
|
errdetail_internal("%s",
|
||||||
pg_rusage_show(&ru0))));
|
pg_rusage_show(&ru0))));
|
||||||
old_rel_pages = new_rel_pages;
|
old_rel_pages = new_rel_pages;
|
||||||
} while (new_rel_pages > vacrelstats->nonempty_pages &&
|
} while (new_rel_pages > vacrelstats->nonempty_pages &&
|
||||||
vacrelstats->lock_waiter_detected);
|
vacrelstats->lock_waiter_detected);
|
||||||
|
|
|
@ -773,7 +773,7 @@ assign_client_encoding(const char *newval, void *extra)
|
||||||
*/
|
*/
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
|
(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
|
||||||
errmsg("cannot change client_encoding during a parallel operation")));
|
errmsg("cannot change client_encoding during a parallel operation")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We do not expect an error if PrepareClientEncoding succeeded */
|
/* We do not expect an error if PrepareClientEncoding succeeded */
|
||||||
|
|
|
@ -104,7 +104,7 @@ static char *ExecBuildSlotPartitionKeyDescription(Relation rel,
|
||||||
static void EvalPlanQualStart(EPQState *epqstate, EState *parentestate,
|
static void EvalPlanQualStart(EPQState *epqstate, EState *parentestate,
|
||||||
Plan *planTree);
|
Plan *planTree);
|
||||||
static void ExecPartitionCheck(ResultRelInfo *resultRelInfo,
|
static void ExecPartitionCheck(ResultRelInfo *resultRelInfo,
|
||||||
TupleTableSlot *slot, EState *estate);
|
TupleTableSlot *slot, EState *estate);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note that GetUpdatedColumns() also exists in commands/trigger.c. There does
|
* Note that GetUpdatedColumns() also exists in commands/trigger.c. There does
|
||||||
|
@ -1347,8 +1347,8 @@ InitResultRelInfo(ResultRelInfo *resultRelInfo,
|
||||||
* partition, if there any BR triggers defined on the table. Although
|
* partition, if there any BR triggers defined on the table. Although
|
||||||
* tuple-routing implicitly preserves the partition constraint of the
|
* tuple-routing implicitly preserves the partition constraint of the
|
||||||
* target partition for a given row, the BR triggers may change the row
|
* target partition for a given row, the BR triggers may change the row
|
||||||
* such that the constraint is no longer satisfied, which we must fail
|
* such that the constraint is no longer satisfied, which we must fail for
|
||||||
* for by checking it explicitly.
|
* by checking it explicitly.
|
||||||
*
|
*
|
||||||
* If this is a partitioned table, the partition constraint (if any) of a
|
* If this is a partitioned table, the partition constraint (if any) of a
|
||||||
* given row will be checked just before performing tuple-routing.
|
* given row will be checked just before performing tuple-routing.
|
||||||
|
|
|
@ -421,8 +421,8 @@ ExecInsert(ModifyTableState *mtstate,
|
||||||
* trigger might modify the tuple such that the partition constraint
|
* trigger might modify the tuple such that the partition constraint
|
||||||
* is no longer satisfied, so we need to check in that case.
|
* is no longer satisfied, so we need to check in that case.
|
||||||
*/
|
*/
|
||||||
bool check_partition_constr =
|
bool check_partition_constr =
|
||||||
(resultRelInfo->ri_PartitionCheck != NIL);
|
(resultRelInfo->ri_PartitionCheck != NIL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constraints might reference the tableoid column, so initialize
|
* Constraints might reference the tableoid column, so initialize
|
||||||
|
|
|
@ -196,7 +196,8 @@ pg_be_scram_init(const char *username, const char *shadow_pass)
|
||||||
* parsed.
|
* parsed.
|
||||||
*/
|
*/
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("invalid SCRAM verifier for user \"%s\"", username)));
|
(errmsg("invalid SCRAM verifier for user \"%s\"",
|
||||||
|
username)));
|
||||||
got_verifier = false;
|
got_verifier = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -673,8 +674,8 @@ read_any_attr(char **input, char *attr_p)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_PROTOCOL_VIOLATION),
|
(errcode(ERRCODE_PROTOCOL_VIOLATION),
|
||||||
errmsg("malformed SCRAM message"),
|
errmsg("malformed SCRAM message"),
|
||||||
errdetail("Attribute expected, but found invalid character %s.",
|
errdetail("Attribute expected, but found invalid character %s.",
|
||||||
sanitize_char(attr))));
|
sanitize_char(attr))));
|
||||||
if (attr_p)
|
if (attr_p)
|
||||||
*attr_p = attr;
|
*attr_p = attr;
|
||||||
begin++;
|
begin++;
|
||||||
|
@ -1061,7 +1062,7 @@ read_client_final_message(scram_state *state, char *input)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_PROTOCOL_VIOLATION),
|
(errcode(ERRCODE_PROTOCOL_VIOLATION),
|
||||||
errmsg("malformed SCRAM message"),
|
errmsg("malformed SCRAM message"),
|
||||||
errdetail("Garbage found at the end of client-final-message.")));
|
errdetail("Garbage found at the end of client-final-message.")));
|
||||||
|
|
||||||
state->client_final_message_without_proof = palloc(proof - begin + 1);
|
state->client_final_message_without_proof = palloc(proof - begin + 1);
|
||||||
memcpy(state->client_final_message_without_proof, input, proof - begin);
|
memcpy(state->client_final_message_without_proof, input, proof - begin);
|
||||||
|
|
|
@ -283,7 +283,7 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
attnum = logicalrep_rel_att_by_name(remoterel,
|
attnum = logicalrep_rel_att_by_name(remoterel,
|
||||||
NameStr(desc->attrs[i]->attname));
|
NameStr(desc->attrs[i]->attname));
|
||||||
|
|
||||||
entry->attrmap[i] = attnum;
|
entry->attrmap[i] = attnum;
|
||||||
if (attnum >= 0)
|
if (attnum >= 0)
|
||||||
|
|
|
@ -44,8 +44,8 @@
|
||||||
* point it sets state to READY and stops tracking. Again, there might
|
* point it sets state to READY and stops tracking. Again, there might
|
||||||
* be zero changes in between.
|
* be zero changes in between.
|
||||||
*
|
*
|
||||||
* So the state progression is always: INIT -> DATASYNC -> SYNCWAIT -> CATCHUP ->
|
* So the state progression is always: INIT -> DATASYNC -> SYNCWAIT -> CATCHUP ->
|
||||||
* SYNCDONE -> READY.
|
* SYNCDONE -> READY.
|
||||||
*
|
*
|
||||||
* The catalog pg_subscription_rel is used to keep information about
|
* The catalog pg_subscription_rel is used to keep information about
|
||||||
* subscribed tables and their state. Some transient state during data
|
* subscribed tables and their state. Some transient state during data
|
||||||
|
@ -136,7 +136,8 @@ finish_sync_worker(void)
|
||||||
StartTransactionCommand();
|
StartTransactionCommand();
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("logical replication table synchronization worker for subscription \"%s\", table \"%s\" has finished",
|
(errmsg("logical replication table synchronization worker for subscription \"%s\", table \"%s\" has finished",
|
||||||
MySubscription->name, get_rel_name(MyLogicalRepWorker->relid))));
|
MySubscription->name,
|
||||||
|
get_rel_name(MyLogicalRepWorker->relid))));
|
||||||
CommitTransactionCommand();
|
CommitTransactionCommand();
|
||||||
|
|
||||||
/* Find the main apply worker and signal it. */
|
/* Find the main apply worker and signal it. */
|
||||||
|
@ -164,7 +165,7 @@ wait_for_relation_state_change(Oid relid, char expected_state)
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
LogicalRepWorker *worker;
|
LogicalRepWorker *worker;
|
||||||
XLogRecPtr statelsn;
|
XLogRecPtr statelsn;
|
||||||
|
|
||||||
CHECK_FOR_INTERRUPTS();
|
CHECK_FOR_INTERRUPTS();
|
||||||
|
|
||||||
|
@ -185,7 +186,7 @@ wait_for_relation_state_change(Oid relid, char expected_state)
|
||||||
|
|
||||||
/* Check if the opposite worker is still running and bail if not. */
|
/* Check if the opposite worker is still running and bail if not. */
|
||||||
worker = logicalrep_worker_find(MyLogicalRepWorker->subid,
|
worker = logicalrep_worker_find(MyLogicalRepWorker->subid,
|
||||||
am_tablesync_worker() ? InvalidOid : relid,
|
am_tablesync_worker() ? InvalidOid : relid,
|
||||||
false);
|
false);
|
||||||
LWLockRelease(LogicalRepWorkerLock);
|
LWLockRelease(LogicalRepWorkerLock);
|
||||||
if (!worker)
|
if (!worker)
|
||||||
|
@ -401,8 +402,8 @@ process_syncing_tables_for_apply(XLogRecPtr current_lsn)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Apply has caught up to the position where the table sync has
|
* Apply has caught up to the position where the table sync has
|
||||||
* finished. Mark the table as ready so that the apply will
|
* finished. Mark the table as ready so that the apply will just
|
||||||
* just continue to replicate it normally.
|
* continue to replicate it normally.
|
||||||
*/
|
*/
|
||||||
if (current_lsn >= rstate->lsn)
|
if (current_lsn >= rstate->lsn)
|
||||||
{
|
{
|
||||||
|
@ -436,9 +437,9 @@ process_syncing_tables_for_apply(XLogRecPtr current_lsn)
|
||||||
else
|
else
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there is no sync worker for this table yet, count running sync
|
* If there is no sync worker for this table yet, count
|
||||||
* workers for this subscription, while we have the lock, for
|
* running sync workers for this subscription, while we have
|
||||||
* later.
|
* the lock, for later.
|
||||||
*/
|
*/
|
||||||
nsyncworkers = logicalrep_sync_worker_count(MyLogicalRepWorker->subid);
|
nsyncworkers = logicalrep_sync_worker_count(MyLogicalRepWorker->subid);
|
||||||
LWLockRelease(LogicalRepWorkerLock);
|
LWLockRelease(LogicalRepWorkerLock);
|
||||||
|
@ -858,17 +859,17 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use a standard write lock here. It might be better to
|
* Use a standard write lock here. It might be better to
|
||||||
* disallow access to the table while it's being synchronized. But
|
* disallow access to the table while it's being synchronized.
|
||||||
* we don't want to block the main apply process from working
|
* But we don't want to block the main apply process from
|
||||||
* and it has to open the relation in RowExclusiveLock when
|
* working and it has to open the relation in RowExclusiveLock
|
||||||
* remapping remote relation id to local one.
|
* when remapping remote relation id to local one.
|
||||||
*/
|
*/
|
||||||
rel = heap_open(MyLogicalRepWorker->relid, RowExclusiveLock);
|
rel = heap_open(MyLogicalRepWorker->relid, RowExclusiveLock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a temporary slot for the sync process. We do this
|
* Create a temporary slot for the sync process. We do this
|
||||||
* inside the transaction so that we can use the snapshot made by
|
* inside the transaction so that we can use the snapshot made
|
||||||
* the slot to get existing data.
|
* by the slot to get existing data.
|
||||||
*/
|
*/
|
||||||
res = walrcv_exec(wrconn,
|
res = walrcv_exec(wrconn,
|
||||||
"BEGIN READ ONLY ISOLATION LEVEL "
|
"BEGIN READ ONLY ISOLATION LEVEL "
|
||||||
|
@ -916,14 +917,15 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
|
||||||
/* Wait for main apply worker to tell us to catchup. */
|
/* Wait for main apply worker to tell us to catchup. */
|
||||||
wait_for_worker_state_change(SUBREL_STATE_CATCHUP);
|
wait_for_worker_state_change(SUBREL_STATE_CATCHUP);
|
||||||
|
|
||||||
/*
|
/*----------
|
||||||
* There are now two possible states here:
|
* There are now two possible states here:
|
||||||
* a) Sync is behind the apply. If that's the case we need to
|
* a) Sync is behind the apply. If that's the case we need to
|
||||||
* catch up with it by consuming the logical replication
|
* catch up with it by consuming the logical replication
|
||||||
* stream up to the relstate_lsn. For that, we exit this
|
* stream up to the relstate_lsn. For that, we exit this
|
||||||
* function and continue in ApplyWorkerMain().
|
* function and continue in ApplyWorkerMain().
|
||||||
* b) Sync is caught up with the apply. So it can just set
|
* b) Sync is caught up with the apply. So it can just set
|
||||||
* the state to SYNCDONE and finish.
|
* the state to SYNCDONE and finish.
|
||||||
|
*----------
|
||||||
*/
|
*/
|
||||||
if (*origin_startpos >= MyLogicalRepWorker->relstate_lsn)
|
if (*origin_startpos >= MyLogicalRepWorker->relstate_lsn)
|
||||||
{
|
{
|
||||||
|
@ -943,9 +945,12 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
|
||||||
case SUBREL_STATE_SYNCDONE:
|
case SUBREL_STATE_SYNCDONE:
|
||||||
case SUBREL_STATE_READY:
|
case SUBREL_STATE_READY:
|
||||||
case SUBREL_STATE_UNKNOWN:
|
case SUBREL_STATE_UNKNOWN:
|
||||||
/* Nothing to do here but finish. (UNKNOWN means the relation was
|
|
||||||
|
/*
|
||||||
|
* Nothing to do here but finish. (UNKNOWN means the relation was
|
||||||
* removed from pg_subscription_rel before the sync worker could
|
* removed from pg_subscription_rel before the sync worker could
|
||||||
* start.) */
|
* start.)
|
||||||
|
*/
|
||||||
finish_sync_worker();
|
finish_sync_worker();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1343,9 +1343,9 @@ maybe_reread_subscription(void)
|
||||||
if (!newsub)
|
if (!newsub)
|
||||||
{
|
{
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
||||||
"stop because the subscription was removed",
|
"stop because the subscription was removed",
|
||||||
MySubscription->name)));
|
MySubscription->name)));
|
||||||
|
|
||||||
proc_exit(0);
|
proc_exit(0);
|
||||||
}
|
}
|
||||||
|
@ -1357,9 +1357,9 @@ maybe_reread_subscription(void)
|
||||||
if (!newsub->enabled)
|
if (!newsub->enabled)
|
||||||
{
|
{
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
||||||
"stop because the subscription was disabled",
|
"stop because the subscription was disabled",
|
||||||
MySubscription->name)));
|
MySubscription->name)));
|
||||||
|
|
||||||
proc_exit(0);
|
proc_exit(0);
|
||||||
}
|
}
|
||||||
|
@ -1371,9 +1371,9 @@ maybe_reread_subscription(void)
|
||||||
if (strcmp(newsub->conninfo, MySubscription->conninfo) != 0)
|
if (strcmp(newsub->conninfo, MySubscription->conninfo) != 0)
|
||||||
{
|
{
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
||||||
"restart because the connection information was changed",
|
"restart because the connection information was changed",
|
||||||
MySubscription->name)));
|
MySubscription->name)));
|
||||||
|
|
||||||
proc_exit(0);
|
proc_exit(0);
|
||||||
}
|
}
|
||||||
|
@ -1385,9 +1385,9 @@ maybe_reread_subscription(void)
|
||||||
if (strcmp(newsub->name, MySubscription->name) != 0)
|
if (strcmp(newsub->name, MySubscription->name) != 0)
|
||||||
{
|
{
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
||||||
"restart because subscription was renamed",
|
"restart because subscription was renamed",
|
||||||
MySubscription->name)));
|
MySubscription->name)));
|
||||||
|
|
||||||
proc_exit(0);
|
proc_exit(0);
|
||||||
}
|
}
|
||||||
|
@ -1402,9 +1402,9 @@ maybe_reread_subscription(void)
|
||||||
if (strcmp(newsub->slotname, MySubscription->slotname) != 0)
|
if (strcmp(newsub->slotname, MySubscription->slotname) != 0)
|
||||||
{
|
{
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
||||||
"restart because the replication slot name was changed",
|
"restart because the replication slot name was changed",
|
||||||
MySubscription->name)));
|
MySubscription->name)));
|
||||||
|
|
||||||
proc_exit(0);
|
proc_exit(0);
|
||||||
}
|
}
|
||||||
|
@ -1416,9 +1416,9 @@ maybe_reread_subscription(void)
|
||||||
if (!equal(newsub->publications, MySubscription->publications))
|
if (!equal(newsub->publications, MySubscription->publications))
|
||||||
{
|
{
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
(errmsg("logical replication apply worker for subscription \"%s\" will "
|
||||||
"restart because subscription's publications were changed",
|
"restart because subscription's publications were changed",
|
||||||
MySubscription->name)));
|
MySubscription->name)));
|
||||||
|
|
||||||
proc_exit(0);
|
proc_exit(0);
|
||||||
}
|
}
|
||||||
|
@ -1524,9 +1524,9 @@ ApplyWorkerMain(Datum main_arg)
|
||||||
if (!MySubscription->enabled)
|
if (!MySubscription->enabled)
|
||||||
{
|
{
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("logical replication apply worker for subscription \"%s\" will not "
|
(errmsg("logical replication apply worker for subscription \"%s\" will not "
|
||||||
"start because the subscription was disabled during startup",
|
"start because the subscription was disabled during startup",
|
||||||
MySubscription->name)));
|
MySubscription->name)));
|
||||||
|
|
||||||
proc_exit(0);
|
proc_exit(0);
|
||||||
}
|
}
|
||||||
|
@ -1539,7 +1539,7 @@ ApplyWorkerMain(Datum main_arg)
|
||||||
if (am_tablesync_worker())
|
if (am_tablesync_worker())
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("logical replication table synchronization worker for subscription \"%s\", table \"%s\" has started",
|
(errmsg("logical replication table synchronization worker for subscription \"%s\", table \"%s\" has started",
|
||||||
MySubscription->name, get_rel_name(MyLogicalRepWorker->relid))));
|
MySubscription->name, get_rel_name(MyLogicalRepWorker->relid))));
|
||||||
else
|
else
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("logical replication apply worker for subscription \"%s\" has started",
|
(errmsg("logical replication apply worker for subscription \"%s\" has started",
|
||||||
|
@ -1577,8 +1577,8 @@ ApplyWorkerMain(Datum main_arg)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This shouldn't happen if the subscription is enabled, but guard
|
* This shouldn't happen if the subscription is enabled, but guard
|
||||||
* against DDL bugs or manual catalog changes. (libpqwalreceiver
|
* against DDL bugs or manual catalog changes. (libpqwalreceiver will
|
||||||
* will crash if slot is NULL.
|
* crash if slot is NULL.)
|
||||||
*/
|
*/
|
||||||
if (!myslotname)
|
if (!myslotname)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
|
|
|
@ -1836,7 +1836,7 @@ fireRIRrules(Query *parsetree, List *activeRIRs, bool forUpdatePushedDown)
|
||||||
/* Only normal relations can have RLS policies */
|
/* Only normal relations can have RLS policies */
|
||||||
if (rte->rtekind != RTE_RELATION ||
|
if (rte->rtekind != RTE_RELATION ||
|
||||||
(rte->relkind != RELKIND_RELATION &&
|
(rte->relkind != RELKIND_RELATION &&
|
||||||
rte->relkind != RELKIND_PARTITIONED_TABLE))
|
rte->relkind != RELKIND_PARTITIONED_TABLE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
rel = heap_open(rte->relid, NoLock);
|
rel = heap_open(rte->relid, NoLock);
|
||||||
|
|
|
@ -902,8 +902,8 @@ PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems)
|
||||||
offset != MAXALIGN(offset))
|
offset != MAXALIGN(offset))
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_DATA_CORRUPTED),
|
(errcode(ERRCODE_DATA_CORRUPTED),
|
||||||
errmsg("corrupted item pointer: offset = %u, length = %u",
|
errmsg("corrupted item pointer: offset = %u, length = %u",
|
||||||
offset, (unsigned int) size)));
|
offset, (unsigned int) size)));
|
||||||
|
|
||||||
if (nextitm < nitems && offnum == itemnos[nextitm])
|
if (nextitm < nitems && offnum == itemnos[nextitm])
|
||||||
{
|
{
|
||||||
|
|
|
@ -3639,8 +3639,8 @@ PostgresMain(int argc, char *argv[],
|
||||||
WalSndSignals();
|
WalSndSignals();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pqsignal(SIGHUP, PostgresSigHupHandler); /* set flag to read config
|
pqsignal(SIGHUP, PostgresSigHupHandler); /* set flag to read
|
||||||
* file */
|
* config file */
|
||||||
pqsignal(SIGINT, StatementCancelHandler); /* cancel current query */
|
pqsignal(SIGINT, StatementCancelHandler); /* cancel current query */
|
||||||
pqsignal(SIGTERM, die); /* cancel current query and exit */
|
pqsignal(SIGTERM, die); /* cancel current query and exit */
|
||||||
|
|
||||||
|
|
|
@ -2008,7 +2008,7 @@ json_object_agg_transfn(PG_FUNCTION_ARGS)
|
||||||
if (arg_type == InvalidOid)
|
if (arg_type == InvalidOid)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("could not determine data type for argument %d", 1)));
|
errmsg("could not determine data type for argument %d", 1)));
|
||||||
|
|
||||||
json_categorize_type(arg_type, &state->key_category,
|
json_categorize_type(arg_type, &state->key_category,
|
||||||
&state->key_output_func);
|
&state->key_output_func);
|
||||||
|
@ -2018,7 +2018,7 @@ json_object_agg_transfn(PG_FUNCTION_ARGS)
|
||||||
if (arg_type == InvalidOid)
|
if (arg_type == InvalidOid)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("could not determine data type for argument %d", 2)));
|
errmsg("could not determine data type for argument %d", 2)));
|
||||||
|
|
||||||
json_categorize_type(arg_type, &state->val_category,
|
json_categorize_type(arg_type, &state->val_category,
|
||||||
&state->val_output_func);
|
&state->val_output_func);
|
||||||
|
|
|
@ -1212,7 +1212,7 @@ jsonb_build_object(PG_FUNCTION_ARGS)
|
||||||
if (val_type == InvalidOid || val_type == UNKNOWNOID)
|
if (val_type == InvalidOid || val_type == UNKNOWNOID)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("could not determine data type for argument %d", i + 1)));
|
errmsg("could not determine data type for argument %d", i + 1)));
|
||||||
|
|
||||||
add_jsonb(arg, false, &result, val_type, true);
|
add_jsonb(arg, false, &result, val_type, true);
|
||||||
|
|
||||||
|
@ -1235,7 +1235,7 @@ jsonb_build_object(PG_FUNCTION_ARGS)
|
||||||
if (val_type == InvalidOid || val_type == UNKNOWNOID)
|
if (val_type == InvalidOid || val_type == UNKNOWNOID)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("could not determine data type for argument %d", i + 2)));
|
errmsg("could not determine data type for argument %d", i + 2)));
|
||||||
add_jsonb(arg, PG_ARGISNULL(i + 1), &result, val_type, false);
|
add_jsonb(arg, PG_ARGISNULL(i + 1), &result, val_type, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1295,7 +1295,7 @@ jsonb_build_array(PG_FUNCTION_ARGS)
|
||||||
if (val_type == InvalidOid || val_type == UNKNOWNOID)
|
if (val_type == InvalidOid || val_type == UNKNOWNOID)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("could not determine data type for argument %d", i + 1)));
|
errmsg("could not determine data type for argument %d", i + 1)));
|
||||||
add_jsonb(arg, PG_ARGISNULL(i), &result, val_type, false);
|
add_jsonb(arg, PG_ARGISNULL(i), &result, val_type, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2538,7 +2538,7 @@ describeOneTableDetails(const char *schemaname,
|
||||||
printfPQExpBuffer(&buf,
|
printfPQExpBuffer(&buf,
|
||||||
"SELECT pub.pubname\n"
|
"SELECT pub.pubname\n"
|
||||||
" FROM pg_catalog.pg_publication pub,\n"
|
" FROM pg_catalog.pg_publication pub,\n"
|
||||||
" pg_catalog.pg_get_publication_tables(pub.pubname)\n"
|
" pg_catalog.pg_get_publication_tables(pub.pubname)\n"
|
||||||
"WHERE relid = '%s'\n"
|
"WHERE relid = '%s'\n"
|
||||||
"ORDER BY 1;",
|
"ORDER BY 1;",
|
||||||
oid);
|
oid);
|
||||||
|
|
|
@ -32,7 +32,8 @@ typedef enum
|
||||||
PROCSIG_CATCHUP_INTERRUPT, /* sinval catchup interrupt */
|
PROCSIG_CATCHUP_INTERRUPT, /* sinval catchup interrupt */
|
||||||
PROCSIG_NOTIFY_INTERRUPT, /* listen/notify interrupt */
|
PROCSIG_NOTIFY_INTERRUPT, /* listen/notify interrupt */
|
||||||
PROCSIG_PARALLEL_MESSAGE, /* message from cooperating parallel backend */
|
PROCSIG_PARALLEL_MESSAGE, /* message from cooperating parallel backend */
|
||||||
PROCSIG_WALSND_INIT_STOPPING, /* ask walsenders to prepare for shutdown */
|
PROCSIG_WALSND_INIT_STOPPING, /* ask walsenders to prepare for
|
||||||
|
* shutdown */
|
||||||
|
|
||||||
/* Recovery conflict reasons */
|
/* Recovery conflict reasons */
|
||||||
PROCSIG_RECOVERY_CONFLICT_DATABASE,
|
PROCSIG_RECOVERY_CONFLICT_DATABASE,
|
||||||
|
|
|
@ -57,23 +57,23 @@
|
||||||
#define ZPBITOID 1560
|
#define ZPBITOID 1560
|
||||||
#define VARBITOID 1562
|
#define VARBITOID 1562
|
||||||
#define NUMERICOID 1700
|
#define NUMERICOID 1700
|
||||||
#define REFCURSOROID 1790
|
#define REFCURSOROID 1790
|
||||||
#define REGPROCEDUREOID 2202
|
#define REGPROCEDUREOID 2202
|
||||||
#define REGOPEROID 2203
|
#define REGOPEROID 2203
|
||||||
#define REGOPERATOROID 2204
|
#define REGOPERATOROID 2204
|
||||||
#define REGCLASSOID 2205
|
#define REGCLASSOID 2205
|
||||||
#define REGTYPEOID 2206
|
#define REGTYPEOID 2206
|
||||||
#define REGROLEOID 4096
|
#define REGROLEOID 4096
|
||||||
#define REGNAMESPACEOID 4089
|
#define REGNAMESPACEOID 4089
|
||||||
#define REGTYPEARRAYOID 2211
|
#define REGTYPEARRAYOID 2211
|
||||||
#define UUIDOID 2950
|
#define UUIDOID 2950
|
||||||
#define LSNOID 3220
|
#define LSNOID 3220
|
||||||
#define TSVECTOROID 3614
|
#define TSVECTOROID 3614
|
||||||
#define GTSVECTOROID 3642
|
#define GTSVECTOROID 3642
|
||||||
#define TSQUERYOID 3615
|
#define TSQUERYOID 3615
|
||||||
#define REGCONFIGOID 3734
|
#define REGCONFIGOID 3734
|
||||||
#define REGDICTIONARYOID 3769
|
#define REGDICTIONARYOID 3769
|
||||||
#define JSONBOID 3802
|
#define JSONBOID 3802
|
||||||
#define INT4RANGEOID 3904
|
#define INT4RANGEOID 3904
|
||||||
|
|
||||||
#endif /* PG_TYPE_H */
|
#endif /* PG_TYPE_H */
|
||||||
|
|
|
@ -419,7 +419,7 @@ pg_SSPI_startup(PGconn *conn, int use_negotiate, int payloadlen)
|
||||||
if (conn->sspictx)
|
if (conn->sspictx)
|
||||||
{
|
{
|
||||||
printfPQExpBuffer(&conn->errorMessage,
|
printfPQExpBuffer(&conn->errorMessage,
|
||||||
libpq_gettext("duplicate SSPI authentication request\n"));
|
libpq_gettext("duplicate SSPI authentication request\n"));
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1218,7 +1218,7 @@ PQencryptPasswordConn(PGconn *conn, const char *passwd, const char *user,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printfPQExpBuffer(&conn->errorMessage,
|
printfPQExpBuffer(&conn->errorMessage,
|
||||||
libpq_gettext("unrecognized password encryption algorithm \"%s\"\n"),
|
libpq_gettext("unrecognized password encryption algorithm \"%s\"\n"),
|
||||||
algorithm);
|
algorithm);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1842,16 +1842,23 @@ connectDBComplete(PGconn *conn)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == 1) /* connect_timeout elapsed */
|
if (ret == 1) /* connect_timeout elapsed */
|
||||||
{
|
{
|
||||||
/* If there are no more hosts, return (the error message is already set) */
|
/*
|
||||||
|
* If there are no more hosts, return (the error message is
|
||||||
|
* already set)
|
||||||
|
*/
|
||||||
if (++conn->whichhost >= conn->nconnhost)
|
if (++conn->whichhost >= conn->nconnhost)
|
||||||
{
|
{
|
||||||
conn->whichhost = 0;
|
conn->whichhost = 0;
|
||||||
conn->status = CONNECTION_BAD;
|
conn->status = CONNECTION_BAD;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* Attempt connection to the next host, starting the connect_timeout timer */
|
|
||||||
|
/*
|
||||||
|
* Attempt connection to the next host, starting the
|
||||||
|
* connect_timeout timer
|
||||||
|
*/
|
||||||
pqDropConnection(conn, true);
|
pqDropConnection(conn, true);
|
||||||
conn->addr_cur = conn->connhost[conn->whichhost].addrlist;
|
conn->addr_cur = conn->connhost[conn->whichhost].addrlist;
|
||||||
conn->status = CONNECTION_NEEDED;
|
conn->status = CONNECTION_NEEDED;
|
||||||
|
|
Loading…
Reference in New Issue