aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xloginsert.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2015-05-04 20:58:42 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2015-05-04 21:03:36 +0300
commitec3d976bce7e322c29f1007d19b63b7a3a1a6ee4 (patch)
treefa396024ea54349815697b383fca945b8b3f5612 /src/backend/access/transam/xloginsert.c
parent3c000fd9a68dae9ebd9d1507ab3995cc178de1e5 (diff)
downloadpostgresql-ec3d976bce7e322c29f1007d19b63b7a3a1a6ee4.tar.gz
postgresql-ec3d976bce7e322c29f1007d19b63b7a3a1a6ee4.zip
Fix the same-rel optimization when creating WAL records.
prev_regbuf was never set, and therefore the same-rel flag was never set on WAL records. Report and fix by Zhanq Zq
Diffstat (limited to 'src/backend/access/transam/xloginsert.c')
-rw-r--r--src/backend/access/transam/xloginsert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index 0cdb6af052d..419736da310 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -667,10 +667,10 @@ XLogRecordAssemble(RmgrId rmid, uint8 info,
{
samerel = true;
bkpb.fork_flags |= BKPBLOCK_SAME_REL;
- prev_regbuf = regbuf;
}
else
samerel = false;
+ prev_regbuf = regbuf;
/* Ok, copy the header to the scratch buffer */
memcpy(scratch, &bkpb, SizeOfXLogRecordBlockHeader);