diff options
author | Tom Lane | 2017-11-03 20:31:32 +0000 |
---|---|---|
committer | Tom Lane | 2017-11-03 20:31:32 +0000 |
commit | 4c11d2c559e76892156fd08d6a3cf5e1848a017f (patch) | |
tree | 9cf756daab9e2a911d2c0e432338aba46757d128 /contrib/bloom/blinsert.c | |
parent | 1b890562b8d1b44bd3ef948aeeb58dd59abd04b7 (diff) |
Flag index metapages as standard-format in xlog.c calls.
btree, hash, and bloom indexes all set up their metapages in standard
format (that is, with pd_lower and pd_upper correctly delimiting the
unused area); but they mostly didn't inform the xlog routines of this.
When calling log_newpage[_buffer], this is bad because it loses the
opportunity to compress unused data out of the WAL record. When
calling XLogRegisterBuffer, it's not such a performance problem because
all of these call sites also use REGBUF_WILL_INIT, preventing an FPI
image from being written. But it's still a good idea to provide the
flag when relevant, because that aids WAL consistency checking.
This completes the project of getting all the in-core index AMs to
handle their metapage WAL operations similarly.
Amit Kapila, reviewed by Michael Paquier
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'contrib/bloom/blinsert.c')
-rw-r--r-- | contrib/bloom/blinsert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/bloom/blinsert.c b/contrib/bloom/blinsert.c index 0d506e3c1ad..1fcb2815086 100644 --- a/contrib/bloom/blinsert.c +++ b/contrib/bloom/blinsert.c @@ -175,7 +175,7 @@ blbuildempty(Relation index) smgrwrite(index->rd_smgr, INIT_FORKNUM, BLOOM_METAPAGE_BLKNO, (char *) metapage, true); log_newpage(&index->rd_smgr->smgr_rnode.node, INIT_FORKNUM, - BLOOM_METAPAGE_BLKNO, metapage, false); + BLOOM_METAPAGE_BLKNO, metapage, true); /* * An immediate sync is required even if we xlog'd the page, because the |