pgsql: Make CLUSTER lock the old table's toast table before copying dat

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make CLUSTER lock the old table's toast table before copying dat
Date: 2011-05-01 21:58:17
Message-ID: E1QGeef-0004JZ-Mm@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make CLUSTER lock the old table's toast table before copying data.

We must lock out autovacuuming of the old toast table before computing the
OldestXmin horizon we will use. Otherwise, autovacuum could start on the
toast table later, compute a later OldestXmin horizon, and remove as DEAD
toast tuples that we still need (because we think their parent tuples are
only RECENTLY_DEAD). Per further thought about bug #5998.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/83b7584944b3a9df064cccac06822093f1a83793

Modified Files
--------------
src/backend/commands/cluster.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2011-05-01 22:06:31 pgsql: Catch errors in for loop in makefile
Previous Message Dave Page 2011-05-01 09:15:51 Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64