Re: Recovery bug in GIN, missing full page image - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Recovery bug in GIN, missing full page image
Date
Msg-id 529E4F40.5040208@vmware.com
Whole thread Raw
In response to Recovery bug in GIN, missing full page image  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List 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

pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Why we are going to have to go DirectIO
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Fix a couple of bugs in MultiXactId freezing