aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2017-05-08 08:49:28 +0100
committerSimon Riggs <simon@2ndQuadrant.com>2017-05-08 08:49:28 +0100
commit1f30295eab65eddaa88528876ab66e7095f4bb65 (patch)
tree02a3feb5b87e61451fbbb708a73dfe83e4006b43
parent27dae036a5809a61104b7380f0cd98c37b43170f (diff)
downloadpostgresql-1f30295eab65eddaa88528876ab66e7095f4bb65.tar.gz
postgresql-1f30295eab65eddaa88528876ab66e7095f4bb65.zip
Remove poorly worded and duplicated comment
Move line of code to avoid need for duplicated comment Brought to attention by Masahiko Sawada
-rw-r--r--src/backend/utils/time/snapmgr.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 3a3a25a0c36..5fa665eafc4 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -2039,14 +2039,6 @@ SerializeSnapshot(Snapshot snapshot, char *start_address)
serialized_snapshot.whenTaken = snapshot->whenTaken;
serialized_snapshot.lsn = snapshot->lsn;
- /*
- * Ignore the SubXID array if it has overflowed, unless the snapshot was
- * taken during recovey - in that case, top-level XIDs are in subxip as
- * well, and we mustn't lose them.
- */
- if (serialized_snapshot.suboverflowed && !snapshot->takenDuringRecovery)
- serialized_snapshot.subxcnt = 0;
-
/* Copy struct to possibly-unaligned buffer */
memcpy(start_address,
&serialized_snapshot, sizeof(SerializedSnapshotData));
@@ -2063,6 +2055,9 @@ SerializeSnapshot(Snapshot snapshot, char *start_address)
* snapshot taken during recovery; all the top-level XIDs are in subxip as
* well in that case, so we mustn't lose them.
*/
+ if (serialized_snapshot.suboverflowed && !snapshot->takenDuringRecovery)
+ serialized_snapshot.subxcnt = 0;
+
if (serialized_snapshot.subxcnt > 0)
{
Size subxipoff = sizeof(SerializedSnapshotData) +