git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 75c5705)
Reorder LOCALLOCK structure members to compact the size
2019年3月19日 13:07:08 +0000 (14:07 +0100)
2019年3月19日 13:07:08 +0000 (14:07 +0100)
Save 8 bytes (on x86-64) by filling up padding holes.

Author: Takayuki Tsunakawa <tsunakawa.takay@jp.fujitsu.com>
Discussion: https://www.postgresql.org/message-id/20190219001639.ft7kxir2iz644alf@alap3.anarazel.de


diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index 16b927cb801d4d60382f780c2c8a8ac6fe409ad8..badf7fd682b3d8ef9f8851f4d6b0dc386a3eac6e 100644 (file)
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -404,15 +404,15 @@ typedef struct LOCALLOCK
LOCALLOCKTAG tag; /* unique identifier of locallock entry */
/* data */
+ uint32 hashcode; /* copy of LOCKTAG's hash value */
LOCK *lock; /* associated LOCK object, if any */
PROCLOCK *proclock; /* associated PROCLOCK object, if any */
- uint32 hashcode; /* copy of LOCKTAG's hash value */
int64 nLocks; /* total number of times lock is held */
- bool holdsStrongLockCount; /* bumped FastPathStrongRelationLocks */
- bool lockCleared; /* we read all sinval msgs for lock */
int numLockOwners; /* # of relevant ResourceOwners */
int maxLockOwners; /* allocated size of array */
LOCALLOCKOWNER *lockOwners; /* dynamically resizable array */
+ bool holdsStrongLockCount; /* bumped FastPathStrongRelationLocks */
+ bool lockCleared; /* we read all sinval msgs for lock */
} LOCALLOCK;
#define LOCALLOCK_LOCKMETHOD(llock) ((llock).tag.lock.locktag_lockmethodid)
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /