Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit651902d

Browse files
committed
Re-run pgindent.
This is just to have a clean base state for testing of Piotr Stefaniak'slatest version of FreeBSD indent. I fixed up a couple of places wherepgindent would have changed format not-nicely. perltidy not included.Discussion:https://postgr.es/m/VI1PR03MB119959F4B65F000CA7CD9F6BF2CC0@VI1PR03MB1199.eurprd03.prod.outlook.com
1 parent096f1cc commit651902d

File tree

24 files changed

+113
-99
lines changed

24 files changed

+113
-99
lines changed

‎src/backend/access/brin/brin_pageops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
356356
ereport(ERROR,
357357
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
358358
errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
359-
itemsz,BrinMaxItemSize,RelationGetRelationName(idxrel))));
359+
itemsz,BrinMaxItemSize,RelationGetRelationName(idxrel))));
360360
returnInvalidOffsetNumber;/* keep compiler quiet */
361361
}
362362

‎src/backend/access/brin/brin_validate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ brinvalidate(Oid opclassoid)
265265
continue;/* got it */
266266
ereport(INFO,
267267
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
268-
errmsg("operator class \"%s\" of access method %s is missing support function %d",
269-
opclassname,"brin",i)));
268+
errmsg("operator class \"%s\" of access method %s is missing support function %d",
269+
opclassname,"brin",i)));
270270
result= false;
271271
}
272272

‎src/backend/access/gin/ginvalidate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ ginvalidate(Oid opclassoid)
244244
continue;/* don't need both, see check below loop */
245245
ereport(INFO,
246246
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
247-
errmsg("operator class \"%s\" of access method %s is missing support function %d",
248-
opclassname,"gin",i)));
247+
errmsg("operator class \"%s\" of access method %s is missing support function %d",
248+
opclassname,"gin",i)));
249249
result= false;
250250
}
251251
if (!opclassgroup||

‎src/backend/access/gist/gistvalidate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ gistvalidate(Oid opclassoid)
262262
continue;/* optional methods */
263263
ereport(INFO,
264264
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
265-
errmsg("operator class \"%s\" of access method %s is missing support function %d",
266-
opclassname,"gist",i)));
265+
errmsg("operator class \"%s\" of access method %s is missing support function %d",
266+
opclassname,"gist",i)));
267267
result= false;
268268
}
269269

‎src/backend/catalog/index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3463,7 +3463,7 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
34633463
(errmsg("index \"%s\" was reindexed",
34643464
get_rel_name(indexId)),
34653465
errdetail_internal("%s",
3466-
pg_rusage_show(&ru0))));
3466+
pg_rusage_show(&ru0))));
34673467

34683468
/* Close rels, but keep locks */
34693469
index_close(iRel,NoLock);

‎src/backend/commands/copy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2648,8 +2648,8 @@ CopyFrom(CopyState cstate)
26482648
* tuple such that the partition constraint is no longer
26492649
* satisfied, so we need to check in that case.
26502650
*/
2651-
boolcheck_partition_constr=
2652-
(resultRelInfo->ri_PartitionCheck!=NIL);
2651+
boolcheck_partition_constr=
2652+
(resultRelInfo->ri_PartitionCheck!=NIL);
26532653

26542654
if (saved_resultRelInfo!=NULL&&
26552655
!(resultRelInfo->ri_TrigDesc&&

‎src/backend/commands/vacuumlazy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
18271827
RelationGetRelationName(onerel),
18281828
old_rel_pages,new_rel_pages),
18291829
errdetail_internal("%s",
1830-
pg_rusage_show(&ru0))));
1830+
pg_rusage_show(&ru0))));
18311831
old_rel_pages=new_rel_pages;
18321832
}while (new_rel_pages>vacrelstats->nonempty_pages&&
18331833
vacrelstats->lock_waiter_detected);

‎src/backend/commands/variable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ assign_client_encoding(const char *newval, void *extra)
773773
*/
774774
ereport(ERROR,
775775
(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
776-
errmsg("cannot change client_encoding during a parallel operation")));
776+
errmsg("cannot change client_encoding during a parallel operation")));
777777
}
778778

779779
/* We do not expect an error if PrepareClientEncoding succeeded */

‎src/backend/executor/execMain.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static char *ExecBuildSlotPartitionKeyDescription(Relation rel,
104104
staticvoidEvalPlanQualStart(EPQState*epqstate,EState*parentestate,
105105
Plan*planTree);
106106
staticvoidExecPartitionCheck(ResultRelInfo*resultRelInfo,
107-
TupleTableSlot*slot,EState*estate);
107+
TupleTableSlot*slot,EState*estate);
108108

109109
/*
110110
* Note that GetUpdatedColumns() also exists in commands/trigger.c. There does
@@ -1347,8 +1347,8 @@ InitResultRelInfo(ResultRelInfo *resultRelInfo,
13471347
* partition, if there any BR triggers defined on the table. Although
13481348
* tuple-routing implicitly preserves the partition constraint of the
13491349
* target partition for a given row, the BR triggers may change the row
1350-
* such that the constraint is no longer satisfied, which we must fail
1351-
*forby checking it explicitly.
1350+
* such that the constraint is no longer satisfied, which we must fail for
1351+
* by checking it explicitly.
13521352
*
13531353
* If this is a partitioned table, the partition constraint (if any) of a
13541354
* given row will be checked just before performing tuple-routing.

‎src/backend/executor/nodeModifyTable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,8 @@ ExecInsert(ModifyTableState *mtstate,
421421
* trigger might modify the tuple such that the partition constraint
422422
* is no longer satisfied, so we need to check in that case.
423423
*/
424-
boolcheck_partition_constr=
425-
(resultRelInfo->ri_PartitionCheck!=NIL);
424+
boolcheck_partition_constr=
425+
(resultRelInfo->ri_PartitionCheck!=NIL);
426426

427427
/*
428428
* Constraints might reference the tableoid column, so initialize

‎src/backend/libpq/auth-scram.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ pg_be_scram_init(const char *username, const char *shadow_pass)
196196
* parsed.
197197
*/
198198
ereport(LOG,
199-
(errmsg("invalid SCRAM verifier for user \"%s\"",username)));
199+
(errmsg("invalid SCRAM verifier for user \"%s\"",
200+
username)));
200201
got_verifier= false;
201202
}
202203
}
@@ -673,8 +674,8 @@ read_any_attr(char **input, char *attr_p)
673674
ereport(ERROR,
674675
(errcode(ERRCODE_PROTOCOL_VIOLATION),
675676
errmsg("malformed SCRAM message"),
676-
errdetail("Attribute expected, but found invalid character %s.",
677-
sanitize_char(attr))));
677+
errdetail("Attribute expected, but found invalid character %s.",
678+
sanitize_char(attr))));
678679
if (attr_p)
679680
*attr_p=attr;
680681
begin++;
@@ -1061,7 +1062,7 @@ read_client_final_message(scram_state *state, char *input)
10611062
ereport(ERROR,
10621063
(errcode(ERRCODE_PROTOCOL_VIOLATION),
10631064
errmsg("malformed SCRAM message"),
1064-
errdetail("Garbage found at the end of client-final-message.")));
1065+
errdetail("Garbage found at the end of client-final-message.")));
10651066

10661067
state->client_final_message_without_proof=palloc(proof-begin+1);
10671068
memcpy(state->client_final_message_without_proof,input,proof-begin);

‎src/backend/replication/logical/relation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode)
283283
continue;
284284

285285
attnum=logicalrep_rel_att_by_name(remoterel,
286-
NameStr(desc->attrs[i]->attname));
286+
NameStr(desc->attrs[i]->attname));
287287

288288
entry->attrmap[i]=attnum;
289289
if (attnum >=0)

‎src/backend/replication/logical/tablesync.c

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
* point it sets state to READY and stops tracking. Again, there might
4545
* be zero changes in between.
4646
*
47-
* So the state progression is always: INIT -> DATASYNC -> SYNCWAIT -> CATCHUP ->
48-
* SYNCDONE -> READY.
47+
* So the state progression is always: INIT -> DATASYNC -> SYNCWAIT -> CATCHUP ->
48+
* SYNCDONE -> READY.
4949
*
5050
* The catalog pg_subscription_rel is used to keep information about
5151
* subscribed tables and their state. Some transient state during data
@@ -136,7 +136,8 @@ finish_sync_worker(void)
136136
StartTransactionCommand();
137137
ereport(LOG,
138138
(errmsg("logical replication table synchronization worker for subscription \"%s\", table \"%s\" has finished",
139-
MySubscription->name,get_rel_name(MyLogicalRepWorker->relid))));
139+
MySubscription->name,
140+
get_rel_name(MyLogicalRepWorker->relid))));
140141
CommitTransactionCommand();
141142

142143
/* Find the main apply worker and signal it. */
@@ -164,7 +165,7 @@ wait_for_relation_state_change(Oid relid, char expected_state)
164165
for (;;)
165166
{
166167
LogicalRepWorker*worker;
167-
XLogRecPtrstatelsn;
168+
XLogRecPtrstatelsn;
168169

169170
CHECK_FOR_INTERRUPTS();
170171

@@ -185,7 +186,7 @@ wait_for_relation_state_change(Oid relid, char expected_state)
185186

186187
/* Check if the opposite worker is still running and bail if not. */
187188
worker=logicalrep_worker_find(MyLogicalRepWorker->subid,
188-
am_tablesync_worker() ?InvalidOid :relid,
189+
am_tablesync_worker() ?InvalidOid :relid,
189190
false);
190191
LWLockRelease(LogicalRepWorkerLock);
191192
if (!worker)
@@ -401,8 +402,8 @@ process_syncing_tables_for_apply(XLogRecPtr current_lsn)
401402
{
402403
/*
403404
* Apply has caught up to the position where the table sync has
404-
* finished. Mark the table as ready so that the apply will
405-
*justcontinue to replicate it normally.
405+
* finished. Mark the table as ready so that the apply will just
406+
* continue to replicate it normally.
406407
*/
407408
if (current_lsn >=rstate->lsn)
408409
{
@@ -436,9 +437,9 @@ process_syncing_tables_for_apply(XLogRecPtr current_lsn)
436437
else
437438

438439
/*
439-
* If there is no sync worker for this table yet, count running sync
440-
* workers for this subscription, while we have the lock, for
441-
* later.
440+
* If there is no sync worker for this table yet, count
441+
*running syncworkers for this subscription, while we have
442+
*the lock, forlater.
442443
*/
443444
nsyncworkers=logicalrep_sync_worker_count(MyLogicalRepWorker->subid);
444445
LWLockRelease(LogicalRepWorkerLock);
@@ -858,17 +859,17 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
858859

859860
/*
860861
* Use a standard write lock here. It might be better to
861-
* disallow access to the table while it's being synchronized. But
862-
* we don't want to block the main apply process from working
863-
* and it has to open the relation in RowExclusiveLock when
864-
* remapping remote relation id to local one.
862+
* disallow access to the table while it's being synchronized.
863+
*Butwe don't want to block the main apply process from
864+
*workingand it has to open the relation in RowExclusiveLock
865+
*whenremapping remote relation id to local one.
865866
*/
866867
rel=heap_open(MyLogicalRepWorker->relid,RowExclusiveLock);
867868

868869
/*
869870
* Create a temporary slot for the sync process. We do this
870-
* inside the transaction so that we can use the snapshot made by
871-
* the slot to get existing data.
871+
* inside the transaction so that we can use the snapshot made
872+
*bythe slot to get existing data.
872873
*/
873874
res=walrcv_exec(wrconn,
874875
"BEGIN READ ONLY ISOLATION LEVEL "
@@ -916,14 +917,15 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
916917
/* Wait for main apply worker to tell us to catchup. */
917918
wait_for_worker_state_change(SUBREL_STATE_CATCHUP);
918919

919-
/*
920+
/*----------
920921
* There are now two possible states here:
921922
* a) Sync is behind the apply. If that's the case we need to
922-
* catch up with it by consuming the logical replication
923-
* stream up to the relstate_lsn. For that, we exit this
924-
* function and continue in ApplyWorkerMain().
923+
* catch up with it by consuming the logical replication
924+
* stream up to the relstate_lsn. For that, we exit this
925+
* function and continue in ApplyWorkerMain().
925926
* b) Sync is caught up with the apply. So it can just set
926-
* the state to SYNCDONE and finish.
927+
* the state to SYNCDONE and finish.
928+
*----------
927929
*/
928930
if (*origin_startpos >=MyLogicalRepWorker->relstate_lsn)
929931
{
@@ -943,9 +945,12 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
943945
caseSUBREL_STATE_SYNCDONE:
944946
caseSUBREL_STATE_READY:
945947
caseSUBREL_STATE_UNKNOWN:
946-
/* Nothing to do here but finish. (UNKNOWN means the relation was
948+
949+
/*
950+
* Nothing to do here but finish. (UNKNOWN means the relation was
947951
* removed from pg_subscription_rel before the sync worker could
948-
* start.) */
952+
* start.)
953+
*/
949954
finish_sync_worker();
950955
break;
951956
default:

‎src/backend/replication/logical/worker.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,9 +1343,9 @@ maybe_reread_subscription(void)
13431343
if (!newsub)
13441344
{
13451345
ereport(LOG,
1346-
(errmsg("logical replication apply worker for subscription \"%s\" will "
1347-
"stop because the subscription was removed",
1348-
MySubscription->name)));
1346+
(errmsg("logical replication apply worker for subscription \"%s\" will "
1347+
"stop because the subscription was removed",
1348+
MySubscription->name)));
13491349

13501350
proc_exit(0);
13511351
}
@@ -1357,9 +1357,9 @@ maybe_reread_subscription(void)
13571357
if (!newsub->enabled)
13581358
{
13591359
ereport(LOG,
1360-
(errmsg("logical replication apply worker for subscription \"%s\" will "
1361-
"stop because the subscription was disabled",
1362-
MySubscription->name)));
1360+
(errmsg("logical replication apply worker for subscription \"%s\" will "
1361+
"stop because the subscription was disabled",
1362+
MySubscription->name)));
13631363

13641364
proc_exit(0);
13651365
}
@@ -1371,9 +1371,9 @@ maybe_reread_subscription(void)
13711371
if (strcmp(newsub->conninfo,MySubscription->conninfo)!=0)
13721372
{
13731373
ereport(LOG,
1374-
(errmsg("logical replication apply worker for subscription \"%s\" will "
1375-
"restart because the connection information was changed",
1376-
MySubscription->name)));
1374+
(errmsg("logical replication apply worker for subscription \"%s\" will "
1375+
"restart because the connection information was changed",
1376+
MySubscription->name)));
13771377

13781378
proc_exit(0);
13791379
}
@@ -1385,9 +1385,9 @@ maybe_reread_subscription(void)
13851385
if (strcmp(newsub->name,MySubscription->name)!=0)
13861386
{
13871387
ereport(LOG,
1388-
(errmsg("logical replication apply worker for subscription \"%s\" will "
1389-
"restart because subscription was renamed",
1390-
MySubscription->name)));
1388+
(errmsg("logical replication apply worker for subscription \"%s\" will "
1389+
"restart because subscription was renamed",
1390+
MySubscription->name)));
13911391

13921392
proc_exit(0);
13931393
}
@@ -1402,9 +1402,9 @@ maybe_reread_subscription(void)
14021402
if (strcmp(newsub->slotname,MySubscription->slotname)!=0)
14031403
{
14041404
ereport(LOG,
1405-
(errmsg("logical replication apply worker for subscription \"%s\" will "
1406-
"restart because the replication slot name was changed",
1407-
MySubscription->name)));
1405+
(errmsg("logical replication apply worker for subscription \"%s\" will "
1406+
"restart because the replication slot name was changed",
1407+
MySubscription->name)));
14081408

14091409
proc_exit(0);
14101410
}
@@ -1416,9 +1416,9 @@ maybe_reread_subscription(void)
14161416
if (!equal(newsub->publications,MySubscription->publications))
14171417
{
14181418
ereport(LOG,
1419-
(errmsg("logical replication apply worker for subscription \"%s\" will "
1420-
"restart because subscription's publications were changed",
1421-
MySubscription->name)));
1419+
(errmsg("logical replication apply worker for subscription \"%s\" will "
1420+
"restart because subscription's publications were changed",
1421+
MySubscription->name)));
14221422

14231423
proc_exit(0);
14241424
}
@@ -1524,9 +1524,9 @@ ApplyWorkerMain(Datum main_arg)
15241524
if (!MySubscription->enabled)
15251525
{
15261526
ereport(LOG,
1527-
(errmsg("logical replication apply worker for subscription \"%s\" will not "
1527+
(errmsg("logical replication apply worker for subscription \"%s\" will not "
15281528
"start because the subscription was disabled during startup",
1529-
MySubscription->name)));
1529+
MySubscription->name)));
15301530

15311531
proc_exit(0);
15321532
}
@@ -1539,7 +1539,7 @@ ApplyWorkerMain(Datum main_arg)
15391539
if (am_tablesync_worker())
15401540
ereport(LOG,
15411541
(errmsg("logical replication table synchronization worker for subscription \"%s\", table \"%s\" has started",
1542-
MySubscription->name,get_rel_name(MyLogicalRepWorker->relid))));
1542+
MySubscription->name,get_rel_name(MyLogicalRepWorker->relid))));
15431543
else
15441544
ereport(LOG,
15451545
(errmsg("logical replication apply worker for subscription \"%s\" has started",
@@ -1577,8 +1577,8 @@ ApplyWorkerMain(Datum main_arg)
15771577

15781578
/*
15791579
* This shouldn't happen if the subscription is enabled, but guard
1580-
* against DDL bugs or manual catalog changes. (libpqwalreceiver
1581-
*willcrash if slot is NULL.
1580+
* against DDL bugs or manual catalog changes. (libpqwalreceiver will
1581+
* crash if slot is NULL.)
15821582
*/
15831583
if (!myslotname)
15841584
ereport(ERROR,

‎src/backend/rewrite/rewriteHandler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,7 @@ fireRIRrules(Query *parsetree, List *activeRIRs, bool forUpdatePushedDown)
18361836
/* Only normal relations can have RLS policies */
18371837
if (rte->rtekind!=RTE_RELATION||
18381838
(rte->relkind!=RELKIND_RELATION&&
1839-
rte->relkind!=RELKIND_PARTITIONED_TABLE))
1839+
rte->relkind!=RELKIND_PARTITIONED_TABLE))
18401840
continue;
18411841

18421842
rel=heap_open(rte->relid,NoLock);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp