Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 85aa22c

Browse filesBrowse 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 5ae01df commit 85aa22c
Copy full SHA for 85aa22c

File tree

Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed

‎src/backend/utils/adt/lockfuncs.c

Copy file name to clipboardExpand all lines: src/backend/utils/adt/lockfuncs.c
+2-2Lines 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

Copy file name to clipboardExpand all lines: src/include/storage/lock.h
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ typedef enum LockTagType
142142
/* ID info for a relation is DB OID + REL OID; DB OID = 0 if shared */
143143
LOCKTAG_RELATION_EXTEND, /* the right to extend a relation */
144144
/* same ID info as RELATION */
145-
LOCKTAG_DATABASE_FROZEN_IDS, /* pg_database.datfrozenxid */
146-
/* ID info for frozen IDs is DB OID */
147145
LOCKTAG_PAGE, /* one page of a relation */
148146
/* ID info for a page is RELATION info + BlockNumber */
149147
LOCKTAG_TUPLE, /* one physical tuple */
@@ -163,10 +161,12 @@ typedef enum LockTagType
163161
* Also, we use DB OID = 0 for shared objects such as tablespaces.
164162
*/
165163
LOCKTAG_USERLOCK, /* reserved for old contrib/userlock code */
166-
LOCKTAG_ADVISORY /* advisory user locks */
164+
LOCKTAG_ADVISORY, /* advisory user locks */
165+
LOCKTAG_DATABASE_FROZEN_IDS /* pg_database.datfrozenxid */
166+
/* ID info for frozen IDs is DB OID */
167167
} LockTagType;
168168

169-
#define LOCKTAG_LAST_TYPE LOCKTAG_ADVISORY
169+
#define LOCKTAG_LAST_TYPE LOCKTAG_DATABASE_FROZEN_IDS
170170

171171
extern const char *const LockTagTypeNames[];
172172

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.