Here's a patch for WAL logging tuple freezes in vacuum, per discussion
on pgsql-bugs.
This patch is against CVS head. Should this be backported to stable
branches? I think it should.
After writing the patch, I realized that it needs some thought if
backported, because WAL records of removing tuples and freezing tuples
share the same heapam opcode XLOG_HEAP_CLEAN, and are only
differentiated by setting a flag. If we applied the patch as it is, and
for some reason someone replayed a WAL log generated by a newer version,
with the patch, with an older version, without the patch, the older
version would interpret the freeze WAL records as dead tuple removals,
and remove live records. I would've liked to give freezing a new opcode,
but we've ran out of them (see htup.h).
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Responses
pgsql-hackers by date
| Next: | From: Markus Schiltknecht | Date: 2006-10-24 08:26:39 |
| Subject: Re: Replication documentation addition |
| Previous: | From: Bruce Momjian | Date: 2006-10-24 04:20:40 |
| Subject: Replication documentation addition |
pgsql-patches by date
| Next: | From: Hitoshi Harada | Date: 2006-10-24 09:52:01 |
| Subject: Re: [PATCHES] smartvacuum() instead of autovacuum |
| Previous: | From: Magnus Hagander | Date: 2006-10-24 06:05:28 |
| Subject: Re: BUG #2712: could not fsync segment: Permission |