WAL logging freezing

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: WAL logging freezing
Date: 2006-10-24 07:20:13
Message-ID: 453DBEAD.3080201@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

Attachment Content-Type Size
logfreezes.diff text/plain 11.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Schiltknecht 2006-10-24 08:26:39 Re: Replication documentation addition
Previous Message Bruce Momjian 2006-10-24 04:20:40 Replication documentation addition

Browse pgsql-patches by date

  From Date Subject
Next Message Hitoshi Harada 2006-10-24 09:52:01 Re: [PATCHES] smartvacuum() instead of autovacuum
Previous Message Magnus Hagander 2006-10-24 06:05:28 Re: BUG #2712: could not fsync segment: Permission