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

pgsql: Repair VACUUM FULL bug introduced by HOT patch: the original way

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Repair VACUUM FULL bug introduced by HOT patch: the original way
Date: 2008-02-11 19:14:30
Message-ID: 20080211191430.A5198754108@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Repair VACUUM FULL bug introduced by HOT patch: the original way of
calculating a page's initial free space was fine, and should not have been
"improved" by letting PageGetHeapFreeSpace do it.  VACUUM FULL is going to
reclaim LP_DEAD line pointers later, so there is no need for a guard
against the page being too full of line pointers, and having one risks
rejecting pages that are perfectly good move destinations.

This also exposed a second bug, which is that the empty_end_pages logic
assumed that any page with no live tuples would get entered into the
fraged_pages list automatically (by virtue of having more free space than
the threshold in the do_frag calculation).  This assumption certainly
seems risky when a low fillfactor has been chosen, and even without
tunable fillfactor I think it could conceivably fail on a page with many
unused line pointers.  So fix the code to force do_frag true when notup
is true, and patch this part of the fix all the way back.

Per report from Tomas Szepe.

Modified Files:
--------------
    pgsql/src/backend/commands:
        vacuum.c (r1.363 -> r1.364)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c?r1=1.363&r2=1.364)

pgsql-committers by date

Next:From: Tom LaneDate: 2008-02-11 19:14:38
Subject: pgsql: Repair VACUUM FULL bug introduced by HOT patch: the original way
Previous:From: User DimDate: 2008-02-11 17:38:52
Subject: pgloader - pgloader: First implementation of parallel loading, each

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