diff options
Diffstat (limited to 'src/include/access/transam.h')
-rw-r--r-- | src/include/access/transam.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/include/access/transam.h b/src/include/access/transam.h index 2fe8a591105..d22de19c94c 100644 --- a/src/include/access/transam.h +++ b/src/include/access/transam.h @@ -165,10 +165,14 @@ FullTransactionIdAdvance(FullTransactionId *dest) * when the .dat files in src/include/catalog/ do not specify an OID * for a catalog entry that requires one. Note that genbki.pl assigns * these OIDs independently in each catalog, so they're not guaranteed - * to be globally unique. + * to be globally unique. Furthermore, the bootstrap backend and + * initdb's post-bootstrap processing can also assign OIDs in this range. + * The normal OID-generation logic takes care of any OID conflicts that + * might arise from that. * - * OIDS 12000-16383 are reserved for assignment during initdb - * using the OID generator. (We start the generator at 12000.) + * OIDs 12000-16383 are reserved for unpinned objects created by initdb's + * post-bootstrap processing. initdb forces the OID generator up to + * 12000 as soon as it's made the pinned objects it's responsible for. * * OIDs beginning at 16384 are assigned from the OID generator * during normal multiuser operation. (We force the generator up to @@ -184,11 +188,12 @@ FullTransactionIdAdvance(FullTransactionId *dest) * * NOTE: if the OID generator wraps around, we skip over OIDs 0-16383 * and resume with 16384. This minimizes the odds of OID conflict, by not - * reassigning OIDs that might have been assigned during initdb. + * reassigning OIDs that might have been assigned during initdb. Critically, + * it also ensures that no user-created object will be considered pinned. * ---------- */ #define FirstGenbkiObjectId 10000 -#define FirstBootstrapObjectId 12000 +#define FirstUnpinnedObjectId 12000 #define FirstNormalObjectId 16384 /* @@ -289,6 +294,7 @@ extern void SetTransactionIdLimit(TransactionId oldest_datfrozenxid, extern void AdvanceOldestClogXid(TransactionId oldest_datfrozenxid); extern bool ForceTransactionIdLimitUpdate(void); extern Oid GetNewObjectId(void); +extern void StopGeneratingPinnedObjectIds(void); #ifdef USE_ASSERT_CHECKING extern void AssertTransactionIdInAllowableRange(TransactionId xid); |