Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ba2bc4a

Browse files
committed
Use MaxLockMode symbol in more places.
As long as we have this macro, it makes sense to use it in the LockMethodData structures. Julien Rouhaud Discussion: https://postgr.es/m/20220103064722.ewdv4evlez5m7mdn@jrouhaud
1 parent 9623d89 commit ba2bc4a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/backend/storage/lmgr/lock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static bool Dummy_trace = false;
124124
#endif
125125

126126
static const LockMethodData default_lockmethod = {
127-
AccessExclusiveLock, /* highest valid lock mode number */
127+
MaxLockMode,
128128
LockConflicts,
129129
lock_mode_names,
130130
#ifdef LOCK_DEBUG
@@ -135,7 +135,7 @@ static const LockMethodData default_lockmethod = {
135135
};
136136

137137
static const LockMethodData user_lockmethod = {
138-
AccessExclusiveLock, /* highest valid lock mode number */
138+
MaxLockMode,
139139
LockConflicts,
140140
lock_mode_names,
141141
#ifdef LOCK_DEBUG

src/include/storage/lockdefs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ typedef int LOCKMODE;
4545
#define AccessExclusiveLock 8 /* ALTER TABLE, DROP TABLE, VACUUM FULL,
4646
* and unqualified LOCK TABLE */
4747

48-
#define MaxLockMode 8
48+
#define MaxLockMode 8 /* highest standard lock mode */
4949

5050

5151
/* WAL representation of an AccessExclusiveLock on a table */

0 commit comments

Comments
 (0)