Skip to content

Commit 06e50d8

Browse files
committed
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 566372b. Back-patch to released branches, v12 through 9.5. Reported by Tom Lane. Discussion: https://postgr.es/m/921383.1597523945@sss.pgh.pa.us
1 parent 30e68a2 commit 06e50d8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/backend/utils/adt/lockfuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
const char *const LockTagTypeNames[] = {
2727
"relation",
2828
"extend",
29-
"frozenid",
3029
"page",
3130
"tuple",
3231
"transactionid",
3332
"virtualxid",
3433
"speculative token",
3534
"object",
3635
"userlock",
37-
"advisory"
36+
"advisory",
37+
"frozenid"
3838
};
3939

4040
/* This must match enum PredicateLockTargetType (predicate_internals.h) */

src/include/storage/lock.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,18 @@ typedef enum LockTagType
139139
{
140140
LOCKTAG_RELATION, /* whole relation */
141141
LOCKTAG_RELATION_EXTEND, /* the right to extend a relation */
142-
LOCKTAG_DATABASE_FROZEN_IDS, /* pg_database.datfrozenxid */
143142
LOCKTAG_PAGE, /* one page of a relation */
144143
LOCKTAG_TUPLE, /* one physical tuple */
145144
LOCKTAG_TRANSACTION, /* transaction (for waiting for xact done) */
146145
LOCKTAG_VIRTUALTRANSACTION, /* virtual transaction (ditto) */
147146
LOCKTAG_SPECULATIVE_TOKEN, /* speculative insertion Xid and token */
148147
LOCKTAG_OBJECT, /* non-relation database object */
149148
LOCKTAG_USERLOCK, /* reserved for old contrib/userlock code */
150-
LOCKTAG_ADVISORY /* advisory user locks */
149+
LOCKTAG_ADVISORY, /* advisory user locks */
150+
LOCKTAG_DATABASE_FROZEN_IDS /* pg_database.datfrozenxid */
151151
} LockTagType;
152152

153-
#define LOCKTAG_LAST_TYPE LOCKTAG_ADVISORY
153+
#define LOCKTAG_LAST_TYPE LOCKTAG_DATABASE_FROZEN_IDS
154154

155155
extern const char *const LockTagTypeNames[];
156156

0 commit comments

Comments
 (0)