Re: Recovery bug in GIN, missing full page image

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Recovery bug in GIN, missing full page image
Date: 2013-12-03 21:38:08
Message-ID: 529E4F40.5040208@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/03/2013 04:39 PM, Heikki Linnakangas wrote:
> While looking at Alexander's GIN patch, I noticed an ancient bug in the
> WAL-logging of GIN entry-tree insertions. entryPlaceToPage and
> dataPlacetoPage functions don't make a full-page image of the page, when
> inserting a downlink on a non-leaf page.

Fixed.

For the archives: I used the attached little utility to reproduce this
and test that the fix works. It works like this:

1. Start a base backup with pg_start_backup
2. make a 'before' copy of the data directory,
3. run test script (GIN insertions in this case)
4. make an 'after' copy of the data direcotry.
5. stop backup.

The 'before' and 'after' copies are then mixed together with a little
python script. In effect, the script creates a large number of torn
pages, with bytes from both copies.

- Heikki

Attachment Content-Type Size
datadirfuzzer.tar.gz application/x-gzip 2.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2013-12-03 21:42:01 Re: Why we are going to have to go DirectIO
Previous Message Marko Kreen 2013-12-03 21:30:49 [patch] libpq: Support TLSv1.1+ (was: fe-secure.c and SSL/TLS)