Skip site navigation (1) Skip section navigation (2)

pgsql: Fix two distinct errors in creation of GIN_INSERT_LISTPAGE xlog

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix two distinct errors in creation of GIN_INSERT_LISTPAGE xlog
Date: 2009-09-15 20:31:35
Message-ID: 20090915203135.AAC3E753FB7@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Fix two distinct errors in creation of GIN_INSERT_LISTPAGE xlog records.
In practice these mistakes were always masked when full_page_writes was on,
because XLogInsert would always choose to log the full page, and then
ginRedoInsertListPage wouldn't try to do anything.  But with full_page_writes
off a WAL replay failure was certain.

The GIN_INSERT_LISTPAGE record type could probably be eliminated entirely
in favor of using XLOG_HEAP_NEWPAGE, but I refrained from doing that now
since it would have required a significantly more invasive patch.

In passing do a little bit of code cleanup, including making the accounting
for free space on GIN list pages more precise.  (This wasn't a bug as the
errors were always in the conservative direction.)

Per report from Simon.  Back-patch to 8.4 which contains the identical code.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/access/gin:
        ginfast.c (r1.3 -> r1.3.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/ginfast.c?r1=1.3&r2=1.3.2.1)

pgsql-committers by date

Next:From: User NanardonDate: 2009-09-16 00:51:56
Subject: pgrpm - pgrpm: - don't copy header to avoid memory leaks, rpm 4.4/4.6/5
Previous:From: Tom LaneDate: 2009-09-15 20:31:30
Subject: pgsql: Fix two distinct errors in creation of GIN_INSERT_LISTPAGE xlog

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group