]> granicus.if.org Git - postgresql/commit
Make CLUSTER lock the old table's toast table before copying data.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 1 May 2011 21:57:55 +0000 (17:57 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 1 May 2011 21:57:55 +0000 (17:57 -0400)
commitfd384cfc34b0b2e393c5d9c92acb0600f5a3e5b8
tree0b430ad903547763a645693a7d9cbe6814dd3500
parent735d88e60e634b4563e66b3c200019fd1e556a42
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.
src/backend/commands/cluster.c