From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix double-XLogBeginInsert call in GIN page splits.
Date: Sun, 28 Jun 2015 19:17:55 +0000
Message-ID: <E1Z9I5T-00064P-L8@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fix double-XLogBeginInsert call in GIN page splits.
If data checksums or wal_log_hints is on, and a GIN page is split, the code
to find a new, empty, block was called after having already called
XLogBeginInsert(). That causes an assertion failure or PANIC, if finding the
new block involves updating a FSM page that had not been modified since last
checkpoint, because that update is WAL-logged, which calls XLogBeginInsert
again. Nested XLogBeginInsert calls are not supported.
To fix, rearrange GIN code so that XLogBeginInsert is called later, after
finding the victim buffers.
Reported by Jeff Janes.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/a45c70acf35e43257d86313dcbb7bb0e5201fab1
Modified Files
--------------
src/backend/access/gin/ginbtree.c | 15 ++++++---------
src/backend/access/gin/gindatapage.c | 4 ++++
src/backend/access/gin/ginentrypage.c | 1 +
3 files changed, 11 insertions(+), 9 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: heikki.linnakangas@iki.fi
Subject: Re: pgsql: Fix double-XLogBeginInsert call in GIN page splits.
In-Reply-To: <E1Z9I5T-00064P-L8@gemulon.postgresql.org>
References: <E1Z9I5T-00064P-L8@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