1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-11 05:41:32 +03:00

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:
Noah Misch 2020-08-15 16:15:59 -07:00
parent 30e68a2abb
commit 06e50d8f7e
2 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,6 @@
const char *const LockTagTypeNames[] = { const char *const LockTagTypeNames[] = {
"relation", "relation",
"extend", "extend",
"frozenid",
"page", "page",
"tuple", "tuple",
"transactionid", "transactionid",
@ -34,7 +33,8 @@ 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) */

View File

@ -139,7 +139,6 @@ typedef enum LockTagType
{ {
LOCKTAG_RELATION, /* whole relation */ LOCKTAG_RELATION, /* whole relation */
LOCKTAG_RELATION_EXTEND, /* the right to extend a relation */ LOCKTAG_RELATION_EXTEND, /* the right to extend a relation */
LOCKTAG_DATABASE_FROZEN_IDS, /* pg_database.datfrozenxid */
LOCKTAG_PAGE, /* one page of a relation */ LOCKTAG_PAGE, /* one page of a relation */
LOCKTAG_TUPLE, /* one physical tuple */ LOCKTAG_TUPLE, /* one physical tuple */
LOCKTAG_TRANSACTION, /* transaction (for waiting for xact done) */ LOCKTAG_TRANSACTION, /* transaction (for waiting for xact done) */
@ -147,10 +146,11 @@ typedef enum LockTagType
LOCKTAG_SPECULATIVE_TOKEN, /* speculative insertion Xid and token */ LOCKTAG_SPECULATIVE_TOKEN, /* speculative insertion Xid and token */
LOCKTAG_OBJECT, /* non-relation database object */ LOCKTAG_OBJECT, /* non-relation database object */
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 */
} LockTagType; } LockTagType;
#define LOCKTAG_LAST_TYPE LOCKTAG_ADVISORY #define LOCKTAG_LAST_TYPE LOCKTAG_DATABASE_FROZEN_IDS
extern const char *const LockTagTypeNames[]; extern const char *const LockTagTypeNames[];