Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commite8e44e8

Browse files
committed
Move new LOCKTAG_DATABASE_FROZEN_IDS to end of enum LockTagType.
Several PGXN modules reference LockTagType values; renumbering wouldforce a recompile of those modules. Oversight in back-patch of today'scommit566372b. Back-patch to releasedbranches, v12 through 9.5.Reported by Tom Lane.Discussion:https://postgr.es/m/921383.1597523945@sss.pgh.pa.us
1 parente525770 commite8e44e8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
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
constchar*constLockTagTypeNames[]= {
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ typedef enum LockTagType
141141
/* ID info for a relation is DB OID + REL OID; DB OID = 0 if shared */
142142
LOCKTAG_RELATION_EXTEND,/* the right to extend a relation */
143143
/* same ID info as RELATION */
144-
LOCKTAG_DATABASE_FROZEN_IDS,/* pg_database.datfrozenxid */
145-
/* ID info for frozen IDs is DB OID */
146144
LOCKTAG_PAGE,/* one page of a relation */
147145
/* ID info for a page is RELATION info + BlockNumber */
148146
LOCKTAG_TUPLE,/* one physical tuple */
@@ -162,10 +160,12 @@ typedef enum LockTagType
162160
* Also, we use DB OID = 0 for shared objects such as tablespaces.
163161
*/
164162
LOCKTAG_USERLOCK,/* reserved for old contrib/userlock code */
165-
LOCKTAG_ADVISORY/* advisory user locks */
163+
LOCKTAG_ADVISORY,/* advisory user locks */
164+
LOCKTAG_DATABASE_FROZEN_IDS/* pg_database.datfrozenxid */
165+
/* ID info for frozen IDs is DB OID */
166166
}LockTagType;
167167

168-
#defineLOCKTAG_LAST_TYPELOCKTAG_ADVISORY
168+
#defineLOCKTAG_LAST_TYPELOCKTAG_DATABASE_FROZEN_IDS
169169

170170
externconstchar*constLockTagTypeNames[];
171171

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp