summaryrefslogtreecommitdiff
path: root/src/include/access/transam.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2022-09-28 09:45:27 -0400
committerRobert Haas <rhaas@postgresql.org>2022-09-28 09:55:28 -0400
commita448e49bcbe40fb72e1ed85af910dd216d45bad8 (patch)
tree2815aed4f5e89bdea91cdd35ec89facaa846e438 /src/include/access/transam.h
parent6af082723277eeca74f2da65e7759666bf7c7f9c (diff)
Revert 56-bit relfilenode change and follow-up commits.
There are still some alignment-related failures in the buildfarm, which might or might not be able to be fixed quickly, but I've also just realized that it increased the size of many WAL records by 4 bytes because a block reference contains a RelFileLocator. The effect of that hasn't been studied or discussed, so revert for now.
Diffstat (limited to 'src/include/access/transam.h')
-rw-r--r--src/include/access/transam.h40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/include/access/transam.h b/src/include/access/transam.h
index 2aaad2b9d51..775471d2a7d 100644
--- a/src/include/access/transam.h
+++ b/src/include/access/transam.h
@@ -15,7 +15,6 @@
#define TRANSAM_H
#include "access/xlogdefs.h"
-#include "common/relpath.h"
/* ----------------
@@ -197,33 +196,6 @@ FullTransactionIdAdvance(FullTransactionId *dest)
#define FirstUnpinnedObjectId 12000
#define FirstNormalObjectId 16384
-/* ----------
- * RelFileNumbers are normally assigned sequentially beginning with
- * FirstNormalRelFileNumber, but for system tables the initial RelFileNumber
- * is equal to the table OID. This scheme allows pg_upgrade to work: we expect
- * that the new cluster will contain only system tables, and that none of those
- * will have previously been rewritten, so any RelFileNumber which is in use
- * in both the old and new clusters will be used for the same relation in both
- * places.
- *
- * This is important because pg_upgrade can't reactively move conflicting
- * relations out of the way. If it tries to set the RelFileNumber for a
- * relation to some value that's already in use by a different relation, the
- * upgrade will just fail. It's OK if the same RelFileNumber is used for the
- * same relation, though, since then nothing needs to be changed.
- * ----------
- */
-#define FirstNormalRelFileNumber ((RelFileNumber) 100000)
-
-#define CHECK_RELFILENUMBER_RANGE(relfilenumber) \
-do { \
- if ((relfilenumber) < 0 || (relfilenumber) > MAX_RELFILENUMBER) \
- ereport(ERROR, \
- errcode(ERRCODE_INVALID_PARAMETER_VALUE), \
- errmsg("relfilenumber %llu is out of range", \
- (unsigned long long) (relfilenumber))); \
-} while (0)
-
/*
* VariableCache is a data structure in shared memory that is used to track
* OID and XID assignment state. For largely historical reasons, there is
@@ -243,15 +215,6 @@ typedef struct VariableCacheData
uint32 oidCount; /* OIDs available before must do XLOG work */
/*
- * These fields are protected by RelFileNumberGenLock.
- */
- RelFileNumber nextRelFileNumber; /* next relfilenumber to assign */
- RelFileNumber loggedRelFileNumber; /* last logged relfilenumber */
- RelFileNumber flushedRelFileNumber; /* last flushed relfilenumber */
- XLogRecPtr loggedRelFileNumberRecPtr; /* xlog record pointer w.r.t.
- * loggedRelFileNumber */
-
- /*
* These fields are protected by XidGenLock.
*/
FullTransactionId nextXid; /* next XID to assign */
@@ -330,9 +293,6 @@ extern void SetTransactionIdLimit(TransactionId oldest_datfrozenxid,
extern void AdvanceOldestClogXid(TransactionId oldest_datfrozenxid);
extern bool ForceTransactionIdLimitUpdate(void);
extern Oid GetNewObjectId(void);
-extern RelFileNumber GetNewRelFileNumber(Oid reltablespace,
- char relpersistence);
-extern void SetNextRelFileNumber(RelFileNumber relnumber);
extern void StopGeneratingPinnedObjectIds(void);
#ifdef USE_ASSERT_CHECKING