Skip to content

Commit 28988a8

Browse files
committed
Reorder LOCALLOCK structure members to compact the size
Save 8 bytes (on x86-64) by filling up padding holes. Author: Takayuki Tsunakawa <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected]
1 parent 75c5705 commit 28988a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/include/storage/lock.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -404,15 +404,15 @@ typedef struct LOCALLOCK
404404
LOCALLOCKTAG tag; /* unique identifier of locallock entry */
405405

406406
/* data */
407+
uint32 hashcode; /* copy of LOCKTAG's hash value */
407408
LOCK *lock; /* associated LOCK object, if any */
408409
PROCLOCK *proclock; /* associated PROCLOCK object, if any */
409-
uint32 hashcode; /* copy of LOCKTAG's hash value */
410410
int64 nLocks; /* total number of times lock is held */
411-
bool holdsStrongLockCount; /* bumped FastPathStrongRelationLocks */
412-
bool lockCleared; /* we read all sinval msgs for lock */
413411
int numLockOwners; /* # of relevant ResourceOwners */
414412
int maxLockOwners; /* allocated size of array */
415413
LOCALLOCKOWNER *lockOwners; /* dynamically resizable array */
414+
bool holdsStrongLockCount; /* bumped FastPathStrongRelationLocks */
415+
bool lockCleared; /* we read all sinval msgs for lock */
416416
} LOCALLOCK;
417417

418418
#define LOCALLOCK_LOCKMETHOD(llock) ((llock).tag.lock.locktag_lockmethodid)

0 commit comments

Comments
 (0)