diff options
author | Noah Misch | 2020-08-15 23:15:59 +0000 |
---|---|---|
committer | Noah Misch | 2020-08-15 23:15:59 +0000 |
commit | 06e50d8f7eee9a0b42c8392b75e0780c0a30fa84 (patch) | |
tree | 8455abf635bdbc43810e2b2f5e5d1177db53e5e2 | |
parent | 30e68a2abb3890c3292ff0b2422a7ea04d62acdd (diff) |
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/[email protected]
-rw-r--r-- | src/backend/utils/adt/lockfuncs.c | 4 | ||||
-rw-r--r-- | src/include/storage/lock.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/adt/lockfuncs.c b/src/backend/utils/adt/lockfuncs.c index bb1add7dcf..c669b12afa 100644 --- a/src/backend/utils/adt/lockfuncs.c +++ b/src/backend/utils/adt/lockfuncs.c @@ -26,7 +26,6 @@ const char *const LockTagTypeNames[] = { "relation", "extend", - "frozenid", "page", "tuple", "transactionid", @@ -34,7 +33,8 @@ const char *const LockTagTypeNames[] = { "speculative token", "object", "userlock", - "advisory" + "advisory", + "frozenid" }; /* This must match enum PredicateLockTargetType (predicate_internals.h) */ diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index 5dc7f87368..2d5cf6ede2 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -139,7 +139,6 @@ typedef enum LockTagType { LOCKTAG_RELATION, /* whole 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_TUPLE, /* one physical tuple */ LOCKTAG_TRANSACTION, /* transaction (for waiting for xact done) */ @@ -147,10 +146,11 @@ typedef enum LockTagType LOCKTAG_SPECULATIVE_TOKEN, /* speculative insertion Xid and token */ LOCKTAG_OBJECT, /* non-relation database object */ 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; -#define LOCKTAG_LAST_TYPE LOCKTAG_ADVISORY +#define LOCKTAG_LAST_TYPE LOCKTAG_DATABASE_FROZEN_IDS extern const char *const LockTagTypeNames[]; |