pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Flag index metapages as standard-format in xlog.c calls.
Date: Fri, 03 Nov 2017 20:31:37 +0000
Message-ID: <E1eAicr-0006wJ-Ku@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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/0d273805-0e9e-ec1a-cb84-d4da400b8f85@lab.ntt.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4c11d2c559e76892156fd08d6a3cf5e1848a017f

Modified Files
--------------
contrib/bloom/blinsert.c              | 2 +-
src/backend/access/hash/hashpage.c    | 7 ++++---
src/backend/access/nbtree/nbtinsert.c | 4 ++--
src/backend/access/nbtree/nbtpage.c   | 9 +++++----
src/backend/access/nbtree/nbtree.c    | 2 +-
src/backend/access/nbtree/nbtxlog.c   | 5 +++--
6 files changed, 16 insertions(+), 13 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1eAicr-0006wJ-Ku@gemulon.postgresql.org>
Permalink:  ../E1eAicr-0006wJ-Ku@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eAicr-0006wJ-Ku@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Flag index metapages as standard-format in xlog.c calls.
  In-Reply-To: <E1eAicr-0006wJ-Ku@gemulon.postgresql.org>
  References: <E1eAicr-0006wJ-Ku@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox