aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2012-01-06 22:56:00 -0500
committerRobert Haas <rhaas@postgresql.org>2012-01-06 22:56:00 -0500
commit1fc3d18faa8f4476944bc6854be0f7f6adf4aec8 (patch)
tree8f2f1d7318bd48d69622e14462d8f1870f3186a7 /src
parentdf970a0ac8fb416b179825a135c18ad3293076af (diff)
downloadpostgresql-1fc3d18faa8f4476944bc6854be0f7f6adf4aec8.tar.gz
postgresql-1fc3d18faa8f4476944bc6854be0f7f6adf4aec8.zip
Slightly reorganize struct SnapshotData.
This squeezes out a bunch of alignment padding, reducing the size from 72 to 56 bytes on my machine. At least in my testing, this didn't produce any measurable performance improvement, but the space savings seem like enough justification. Andres Freund
Diffstat (limited to 'src')
-rw-r--r--src/include/utils/snapshot.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/utils/snapshot.h b/src/include/utils/snapshot.h
index 93c02fa42d3..900272e7043 100644
--- a/src/include/utils/snapshot.h
+++ b/src/include/utils/snapshot.h
@@ -46,13 +46,14 @@ typedef struct SnapshotData
*/
TransactionId xmin; /* all XID < xmin are visible to me */
TransactionId xmax; /* all XID >= xmax are invisible to me */
- uint32 xcnt; /* # of xact ids in xip[] */
TransactionId *xip; /* array of xact IDs in progress */
+ uint32 xcnt; /* # of xact ids in xip[] */
/* note: all ids in xip[] satisfy xmin <= xip[i] < xmax */
int32 subxcnt; /* # of xact ids in subxip[] */
TransactionId *subxip; /* array of subxact IDs in progress */
bool suboverflowed; /* has the subxip array overflowed? */
bool takenDuringRecovery; /* recovery-shaped snapshot? */
+ bool copied; /* false if it's a static snapshot */
/*
* note: all ids in subxip[] are >= xmin, but we don't bother filtering
@@ -61,7 +62,6 @@ typedef struct SnapshotData
CommandId curcid; /* in my xact, CID < curcid are visible */
uint32 active_count; /* refcount on ActiveSnapshot stack */
uint32 regd_count; /* refcount on RegisteredSnapshotList */
- bool copied; /* false if it's a static snapshot */
} SnapshotData;
/*