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

Commit18c4c57

Browse files
committed
code cleanup
1 parent6974744 commit18c4c57

File tree

12 files changed

+15
-34
lines changed

12 files changed

+15
-34
lines changed

‎src/backend/access/heap/visibilitymap.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
#include"access/heapam_xlog.h"
8686
#include"access/visibilitymap.h"
8787
#include"access/xlog.h"
88-
#include"utils/snapmgr.h"
8988
#include"miscadmin.h"
9089
#include"storage/bufmgr.h"
9190
#include"storage/lmgr.h"

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
#include"access/xloginsert.h"
4040
#include"access/xlogutils.h"
4141
#include"access/xtm.h"
42-
#include"access/xact.h"
43-
#include"storage/procarray.h"
4442
#include"miscadmin.h"
4543
#include"pg_trace.h"
4644

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2184,11 +2184,3 @@ RecordTransactionAbortPrepared(TransactionId xid,
21842184
*/
21852185
SyncRepWaitForLSN(recptr);
21862186
}
2187-
2188-
/*
2189-
* Return identified of current global transaction
2190-
*/
2191-
constchar*GetLockedGlobalTransactionId()
2192-
{
2193-
returnMyLockedGxact ?MyLockedGxact->gid :NULL;
2194-
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
*
33
* xtm.c
44
*PostgreSQL implementation of transaction manager protocol
5-
*
5+
*
66
* This module defines default iplementaiton of PostgreSQL transaction manager protocol
7-
*
7+
*
88
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* src/backend/access/transam/clog.c
11+
* src/backend/access/transam/xtm.c
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -31,7 +31,7 @@ TransactionManager PgTM = {
3131
PgGetOldestXmin,
3232
PgTransactionIdIsInProgress,
3333
PgGetGlobalTransactionId,
34-
PgXidInMVCCSnapshot
34+
PgXidInMVCCSnapshot
3535
};
3636

3737
TransactionManager*TM=&PgTM;

‎src/backend/storage/ipc/procarray.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
#include"storage/spin.h"
6060
#include"utils/builtins.h"
6161
#include"utils/rel.h"
62-
#include"utils/tqual.h"
6362
#include"utils/snapmgr.h"
6463

64+
6565
/* Our shared memory area */
6666
typedefstructProcArrayStruct
6767
{

‎src/backend/utils/misc/postgresql.conf.sample‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144

145145
#max_files_per_process = 1000# min 25
146146
# (change requires restart)
147-
shared_preload_libraries = 'pg_dtm'# (change requires restart)
147+
#shared_preload_libraries = ''# (change requires restart)
148148

149149
# - Cost-Based Vacuum Delay -
150150

‎src/backend/utils/time/snapmgr.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
#include"utils/snapmgr.h"
5959
#include"utils/syscache.h"
6060
#include"utils/tqual.h"
61-
#include"access/xtm.h"
6261

6362

6463
/*

‎src/backend/utils/time/tqual.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -903,10 +903,8 @@ HeapTupleSatisfiesDirty(HeapTuple htup, Snapshot snapshot,
903903

904904
if (TransactionIdIsInProgress(HeapTupleHeaderGetRawXmax(tuple)))
905905
{
906-
if (!HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask)) {
906+
if (!HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask))
907907
snapshot->xmax=HeapTupleHeaderGetRawXmax(tuple);
908-
return true;
909-
}
910908
return true;
911909
}
912910

@@ -1149,6 +1147,7 @@ HeapTupleSatisfiesMVCC(HeapTuple htup, Snapshot snapshot,
11491147
return false;
11501148
}
11511149

1150+
11521151
/*
11531152
* HeapTupleSatisfiesVacuum
11541153
*
@@ -1456,10 +1455,10 @@ HeapTupleIsSurelyDead(HeapTuple htup, TransactionId OldestXmin)
14561455
returnTransactionIdPrecedes(HeapTupleHeaderGetRawXmax(tuple),OldestXmin);
14571456
}
14581457

1459-
bool
1458+
bool
14601459
XidInMVCCSnapshot(TransactionIdxid,Snapshotsnapshot)
14611460
{
1462-
returnTM->IsInSnapshot(xid,snapshot);
1461+
returnTM->IsInSnapshot(xid,snapshot);
14631462
}
14641463

14651464
/*
@@ -1797,4 +1796,3 @@ HeapTupleSatisfiesHistoricMVCC(HeapTuple htup, Snapshot snapshot,
17971796
else
17981797
return true;
17991798
}
1800-

‎src/include/access/twophase.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,4 @@ extern void CheckPointTwoPhase(XLogRecPtr redo_horizon);
5656

5757
externvoidFinishPreparedTransaction(constchar*gid,boolisCommit);
5858

59-
externconstchar*GetLockedGlobalTransactionId(void);
60-
61-
externintAllocGXid(TransactionIdxid);
62-
externboolRemoveGXid(TransactionIdxid);
63-
6459
#endif/* TWOPHASE_H */

‎src/include/access/xtm.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ typedef struct
3838
/* Get global transaction XID: returns XID of current transaction if it is global, InvalidTransactionId otherwise */
3939
TransactionId (*GetGlobalTransactionId)(void);
4040

41-
/* Is the given XID still-in-progress according to the snapshot (encapsulation of XidInMVCCSnapshot in tqual.c) */
42-
bool (*IsInSnapshot)(TransactionIdxid,Snapshotsnapshot);
41+
/* Is the given XID still-in-progress according to the snapshot (encapsulation of XidInMVCCSnapshot in tqual.c) */
42+
bool (*IsInSnapshot)(TransactionIdxid,Snapshotsnapshot);
4343
}TransactionManager;
4444

4545
/* Get pointer to transaction manager: actually returns content of TM variable */
@@ -52,7 +52,7 @@ extern TransactionManager PgTM; /* Standard PostgreSQL transaction manager */
5252
externboolPgXidInMVCCSnapshot(TransactionIdxid,Snapshotsnapshot);
5353

5454
externvoidPgTransactionIdSetTreeStatus(TransactionIdxid,intnsubxids,
55-
TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn);
55+
TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn);
5656
externXidStatusPgTransactionIdGetStatus(TransactionIdxid,XLogRecPtr*lsn);
5757

5858
externSnapshotPgGetSnapshotData(Snapshotsnapshot);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp