From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: BRIN: fix bug in xlog backup block counting |
Date: | 2014-11-10 21:14:24 |
Message-ID: | E1XnwI4-0006sD-AS@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
BRIN: fix bug in xlog backup block counting
The code that generates the BRIN_XLOG_UPDATE removes the buffer
reference when the page that's target for the updated tuple is freshly
initialized. This is a pretty usual optimization, but was breaking the
case where the revmap buffer, which is referenced in the same WAL
record, is getting a backup block: the replay code was using backup
block index 1, which is not valid when the update target buffer gets
pruned; the revmap buffer gets assigned 0 instead. Make sure to use the
correct backup block index for revmap when replaying.
Bug reported by Fujii Masao.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/a590f266e44c492d2a252ab9dee0cd88dbe06dc5
Modified Files
--------------
src/backend/access/brin/brin_xlog.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2014-11-10 23:08:27 | pgsql: Fix compilation failure on MIPS. |
Previous Message | Robert Haas | 2014-11-10 20:30:46 | pgsql: Fix potential NULL-pointer dereference. |