Move new LOCKTAG_DATABASE_FROZEN_IDS to end of enum LockTagType.
Several PGXN modules reference LockTagType values; renumbering would force a recompile of those modules. Oversight in back-patch of today's commit 566372b3d6435639e4cc4476d79b8505a0297c87. Back-patch to released branches, v12 through 9.5. Reported by Tom Lane. Discussion: https://postgr.es/m/921383.1597523945@sss.pgh.pa.us
This commit is contained in:
parent
3fbbf64cee
commit
d8a22a387b
@ -25,7 +25,6 @@
|
|||||||
static const char *const LockTagTypeNames[] = {
|
static const char *const LockTagTypeNames[] = {
|
||||||
"relation",
|
"relation",
|
||||||
"extend",
|
"extend",
|
||||||
"frozenid",
|
|
||||||
"page",
|
"page",
|
||||||
"tuple",
|
"tuple",
|
||||||
"transactionid",
|
"transactionid",
|
||||||
@ -33,7 +32,8 @@ static const char *const LockTagTypeNames[] = {
|
|||||||
"speculative token",
|
"speculative token",
|
||||||
"object",
|
"object",
|
||||||
"userlock",
|
"userlock",
|
||||||
"advisory"
|
"advisory",
|
||||||
|
"frozenid"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This must match enum PredicateLockTargetType (predicate_internals.h) */
|
/* This must match enum PredicateLockTargetType (predicate_internals.h) */
|
||||||
|
@ -168,8 +168,6 @@ typedef enum LockTagType
|
|||||||
/* ID info for a relation is DB OID + REL OID; DB OID = 0 if shared */
|
/* ID info for a relation is DB OID + REL OID; DB OID = 0 if shared */
|
||||||
LOCKTAG_RELATION_EXTEND, /* the right to extend a relation */
|
LOCKTAG_RELATION_EXTEND, /* the right to extend a relation */
|
||||||
/* same ID info as RELATION */
|
/* same ID info as RELATION */
|
||||||
LOCKTAG_DATABASE_FROZEN_IDS, /* pg_database.datfrozenxid */
|
|
||||||
/* ID info for frozen IDs is DB OID */
|
|
||||||
LOCKTAG_PAGE, /* one page of a relation */
|
LOCKTAG_PAGE, /* one page of a relation */
|
||||||
/* ID info for a page is RELATION info + BlockNumber */
|
/* ID info for a page is RELATION info + BlockNumber */
|
||||||
LOCKTAG_TUPLE, /* one physical tuple */
|
LOCKTAG_TUPLE, /* one physical tuple */
|
||||||
@ -189,10 +187,12 @@ typedef enum LockTagType
|
|||||||
* Also, we use DB OID = 0 for shared objects such as tablespaces.
|
* Also, we use DB OID = 0 for shared objects such as tablespaces.
|
||||||
*/
|
*/
|
||||||
LOCKTAG_USERLOCK, /* reserved for old contrib/userlock code */
|
LOCKTAG_USERLOCK, /* reserved for old contrib/userlock code */
|
||||||
LOCKTAG_ADVISORY /* advisory user locks */
|
LOCKTAG_ADVISORY, /* advisory user locks */
|
||||||
|
LOCKTAG_DATABASE_FROZEN_IDS /* pg_database.datfrozenxid */
|
||||||
|
/* ID info for frozen IDs is DB OID */
|
||||||
} LockTagType;
|
} LockTagType;
|
||||||
|
|
||||||
#define LOCKTAG_LAST_TYPE LOCKTAG_ADVISORY
|
#define LOCKTAG_LAST_TYPE LOCKTAG_DATABASE_FROZEN_IDS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The LOCKTAG struct is defined with malice aforethought to fit into 16
|
* The LOCKTAG struct is defined with malice aforethought to fit into 16
|
||||||
|
Loading…
x
Reference in New Issue
Block a user