Re: Bug in ginRedoRecompress that causes opaque data on page to be overrun

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: "R, Siva" <sivasubr@amazon.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-09-04T21:55:14Z
Lists: pgsql-hackers
On Tue, Sep 4, 2018 at 12:59 PM, R, Siva <sivasubr@amazon.com> wrote:
> We recently encountered an issue where the opaque data flags on a gin data
> leaf page was corrupted while replaying a gin insert WAL record. Upon
> further examination of the redo code, we found a bug in ginRedoRecompress
> code, which extracts the WAL information and updates the page.

I wonder how you managed to detect it in the first place. Were you
using something like wal_consistency_checking=all, with a custom
stress-test?

-- 
Peter Geoghegan


Commits

  1. Fix past pd_upper write in ginRedoRecompress()