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

Commitb06cfc9

Browse files
committed
style fix for xtm patch
1 parente489bc0 commitb06cfc9

File tree

9 files changed

+25
-37
lines changed

9 files changed

+25
-37
lines changed

‎contrib/pg_tsdtm/tests/deploy/roles/postgres/tasks/main.yml‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,6 @@
8383
-stat:path={{pg_datadir}}/postmaster.pid
8484
register:pg_pidfile
8585

86-
# - name: stop postgres if it was running
87-
# command: "{{pg_dst}}/bin/pg_ctl stop -w -D {{pg_datadir}}"
88-
# environment:
89-
# LD_LIBRARY_PATH: "{{pg_dst}}/lib"
90-
# when: pg_pidfile.stat.exists
91-
92-
-name:stop postgres if it was running
93-
shell:"kill -9 `head -n 1 {{pg_datadir}}/postmaster.pid`"
94-
environment:
95-
LD_LIBRARY_PATH:"{{pg_dst}}/lib"
96-
when:pg_pidfile.stat.exists
97-
9886
-name:remove datadirs on datanodes
9987
command:"rm -rf {{pg_datadir}}"
10088
when:pg_destroy_and_init

‎src/backend/access/transam/clog.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ static void TransactionIdSetStatusBit(TransactionId xid, XidStatus status,
9393
staticvoidset_status_by_pages(intnsubxids,TransactionId*subxids,
9494
XidStatusstatus,XLogRecPtrlsn);
9595

96-
void
96+
void
9797
TransactionIdSetTreeStatus(TransactionIdxid,intnsubxids,
98-
TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn)
98+
TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn)
9999
{
100100
returnTM->SetTransactionStatus(xid,nsubxids,subxids,status,lsn);
101101
}
@@ -151,7 +151,7 @@ TransactionIdSetTreeStatus(TransactionId xid, int nsubxids,
151151
* but aren't yet in cache, as well as hinting pages not to fall out of
152152
* cache yet.
153153
*/
154-
void
154+
void
155155
PgTransactionIdSetTreeStatus(TransactionIdxid,intnsubxids,
156156
TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn)
157157
{

‎src/backend/access/transam/transam.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,12 @@ TransactionIdIsKnownCompleted(TransactionId transactionId)
256256
* This commit operation is not guaranteed to be atomic, but if not, subxids
257257
* are correctly marked subcommit first.
258258
*/
259-
void
259+
void
260260
TransactionIdCommitTree(TransactionIdxid,intnxids,TransactionId*xids)
261261
{
262262
TransactionIdSetTreeStatus(xid,nxids,xids,
263-
TRANSACTION_STATUS_COMMITTED,
264-
InvalidXLogRecPtr);
263+
TRANSACTION_STATUS_COMMITTED,
264+
InvalidXLogRecPtr);
265265
}
266266

267267
/*
@@ -273,7 +273,7 @@ TransactionIdAsyncCommitTree(TransactionId xid, int nxids, TransactionId *xids,
273273
XLogRecPtrlsn)
274274
{
275275
TransactionIdSetTreeStatus(xid,nxids,xids,
276-
TRANSACTION_STATUS_COMMITTED,lsn);
276+
TRANSACTION_STATUS_COMMITTED,lsn);
277277
}
278278

279279
/*

‎src/backend/access/transam/xact.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,9 +1273,8 @@ RecordTransactionCommit(void)
12731273
/*
12741274
* Now we may update the CLOG, if we wrote a COMMIT record above
12751275
*/
1276-
if (markXidCommitted) {
1276+
if (markXidCommitted)
12771277
TransactionIdCommitTree(xid,nchildren,children);
1278-
}
12791278
}
12801279
else
12811280
{
@@ -1297,9 +1296,8 @@ RecordTransactionCommit(void)
12971296
* XLOG. Instead, we store the LSN up to which the XLOG must be
12981297
* flushed before the CLOG may be updated.
12991298
*/
1300-
if (markXidCommitted) {
1299+
if (markXidCommitted)
13011300
TransactionIdAsyncCommitTree(xid,nchildren,children,XactLastRecEnd);
1302-
}
13031301
}
13041302

13051303
/*
@@ -5372,7 +5370,7 @@ xact_redo_commit(xl_xact_parsed_commit *parsed,
53725370
* recovered. It's unlikely but it's good to be safe.
53735371
*/
53745372
TransactionIdAsyncCommitTree(
5375-
xid,parsed->nsubxacts,parsed->subxacts,lsn);
5373+
xid,parsed->nsubxacts,parsed->subxacts,lsn);
53765374

53775375
/*
53785376
* We must mark clog before we update the ProcArray.
@@ -5399,6 +5397,7 @@ xact_redo_commit(xl_xact_parsed_commit *parsed,
53995397
*/
54005398
StandbyReleaseLockTree(xid,0,NULL);
54015399
}
5400+
54025401
if (parsed->xinfo&XACT_XINFO_HAS_ORIGIN)
54035402
{
54045403
/* recover apply progress */
@@ -5609,8 +5608,9 @@ xact_redo(XLogReaderState *record)
56095608
elog(PANIC,"xact_redo: unknown op code %u",info);
56105609
}
56115610

5612-
voidMarkAsAborted()
5611+
void
5612+
MarkAsAborted()
56135613
{
5614-
CurrentTransactionState->state=TRANS_INPROGRESS;
5615-
CurrentTransactionState->blockState=TBLOCK_STARTED;
5614+
CurrentTransactionState->state=TRANS_INPROGRESS;
5615+
CurrentTransactionState->blockState=TBLOCK_STARTED;
56165616
}

‎src/backend/access/transam/xtm.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ TransactionId PgGetGlobalTransactionId(void)
2525

2626
boolPgDetectGlobalDeadLock(PGPROC*proc)
2727
{
28-
return false;
28+
return false;
2929
}
3030

3131
charconst*PgGetTransactionManagerName(void)
@@ -42,7 +42,7 @@ TransactionManager PgTM = {
4242
PgTransactionIdIsInProgress,
4343
PgGetGlobalTransactionId,
4444
PgXidInMVCCSnapshot,
45-
PgDetectGlobalDeadLock,
45+
PgDetectGlobalDeadLock,
4646
PgGetTransactionManagerName
4747
};
4848

‎src/backend/storage/lmgr/lock.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3639,7 +3639,7 @@ GetLockmodeName(LOCKMETHODID lockmethodid, LOCKMODE mode)
36393639
returnLockMethods[lockmethodid]->lockModeNames[mode];
36403640
}
36413641

3642-
void
3642+
void
36433643
EnumerateLocks(LockIteratoriterator,void*arg)
36443644
{
36453645
PROCLOCK*proclock;
@@ -3649,8 +3649,8 @@ EnumerateLocks(LockIterator iterator, void* arg)
36493649

36503650
while ((proclock= (PROCLOCK*)hash_seq_search(&status))!=NULL)
36513651
{
3652-
iterator(proclock,arg);
3653-
}
3652+
iterator(proclock,arg);
3653+
}
36543654
}
36553655

36563656
#ifdefLOCK_DEBUG

‎src/include/access/clog.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ typedef int XidStatus;
3131

3232

3333
externvoidTransactionIdSetTreeStatus(TransactionIdxid,intnsubxids,
34-
TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn);
34+
TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn);
3535
externXidStatusTransactionIdGetStatus(TransactionIdxid,XLogRecPtr*lsn);
3636

3737
externSizeCLOGShmemBuffers(void);

‎src/include/access/xtm.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ typedef struct
4242
/* Is the given XID still-in-progress according to the snapshot (encapsulation of XidInMVCCSnapshot in tqual.c) */
4343
bool (*IsInSnapshot)(TransactionIdxid,Snapshotsnapshot);
4444

45-
/* Detect distributed deadlock */
46-
bool (*DetectGlobalDeadLock)(PGPROC*proc);
45+
/* Detect distributed deadlock */
46+
bool (*DetectGlobalDeadLock)(PGPROC*proc);
4747

4848
charconst* (*GetName)(void);
4949
}TransactionManager;
@@ -58,7 +58,7 @@ extern TransactionManager PgTM; /* Standard PostgreSQL transaction manager */
5858
externboolPgXidInMVCCSnapshot(TransactionIdxid,Snapshotsnapshot);
5959

6060
externvoidPgTransactionIdSetTreeStatus(TransactionIdxid,intnsubxids,
61-
TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn);
61+
TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn);
6262
externXidStatusPgTransactionIdGetStatus(TransactionIdxid,XLogRecPtr*lsn);
6363

6464
externSnapshotPgGetSnapshotData(Snapshotsnapshot);

‎src/include/storage/lock.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ typedef enum
456456
DS_HARD_DEADLOCK,/* deadlock, no way out but ERROR */
457457
DS_BLOCKED_BY_AUTOVACUUM,/* no deadlock; queue blocked by autovacuum
458458
* worker */
459-
DS_DISTRIBUTED_DEADLOCK/* distributed deadlock detected by DTM */
459+
DS_DISTRIBUTED_DEADLOCK/* distributed deadlock detected by DTM */
460460
}DeadLockState;
461461

462462
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp