Skip to content

Commit 18c4c57

Browse files
committed
code cleanup
1 parent 6974744 commit 18c4c57

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-
const char* GetLockedGlobalTransactionId()
2192-
{
2193-
return MyLockedGxact ? 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
typedef struct ProcArrayStruct
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
return TransactionIdPrecedes(HeapTupleHeaderGetRawXmax(tuple), OldestXmin);
14571456
}
14581457

1459-
bool
1458+
bool
14601459
XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot)
14611460
{
1462-
return TM->IsInSnapshot(xid, snapshot);
1461+
return TM->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
extern void FinishPreparedTransaction(const char *gid, bool isCommit);
5858

59-
extern const char* GetLockedGlobalTransactionId(void);
60-
61-
extern int AllocGXid(TransactionId xid);
62-
extern bool RemoveGXid(TransactionId xid);
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)(TransactionId xid, Snapshot snapshot);
41+
/* Is the given XID still-in-progress according to the snapshot (encapsulation of XidInMVCCSnapshot in tqual.c) */
42+
bool (*IsInSnapshot)(TransactionId xid, Snapshot snapshot);
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
extern bool PgXidInMVCCSnapshot(TransactionId xid, Snapshot snapshot);
5353

5454
extern void PgTransactionIdSetTreeStatus(TransactionId xid, int nsubxids,
55-
TransactionId *subxids, XidStatus status, XLogRecPtr lsn);
55+
TransactionId *subxids, XidStatus status, XLogRecPtr lsn);
5656
extern XidStatus PgTransactionIdGetStatus(TransactionId xid, XLogRecPtr *lsn);
5757

5858
extern Snapshot PgGetSnapshotData(Snapshot snapshot);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy