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

Commit1fc3d18

Browse files
committed
Slightly reorganize struct SnapshotData.
This squeezes out a bunch of alignment padding, reducing the sizefrom 72 to 56 bytes on my machine. At least in my testing, thisdidn't produce any measurable performance improvement, but the spacesavings seem like enough justification.Andres Freund
1 parentdf970a0 commit1fc3d18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/include/utils/snapshot.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ typedef struct SnapshotData
4646
*/
4747
TransactionIdxmin;/* all XID < xmin are visible to me */
4848
TransactionIdxmax;/* all XID >= xmax are invisible to me */
49-
uint32xcnt;/* # of xact ids in xip[] */
5049
TransactionId*xip;/* array of xact IDs in progress */
50+
uint32xcnt;/* # of xact ids in xip[] */
5151
/* note: all ids in xip[] satisfy xmin <= xip[i] < xmax */
5252
int32subxcnt;/* # of xact ids in subxip[] */
5353
TransactionId*subxip;/* array of subxact IDs in progress */
5454
boolsuboverflowed;/* has the subxip array overflowed? */
5555
booltakenDuringRecovery;/* recovery-shaped snapshot? */
56+
boolcopied;/* false if it's a static snapshot */
5657

5758
/*
5859
* note: all ids in subxip[] are >= xmin, but we don't bother filtering
@@ -61,7 +62,6 @@ typedef struct SnapshotData
6162
CommandIdcurcid;/* in my xact, CID < curcid are visible */
6263
uint32active_count;/* refcount on ActiveSnapshot stack */
6364
uint32regd_count;/* refcount on RegisteredSnapshotList */
64-
boolcopied;/* false if it's a static snapshot */
6565
}SnapshotData;
6666

6767
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp