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

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-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

Attachment: logfreezes.diff
Description: text/plain (11.9 KB)


pgsql-hackers by date

Next:From: Markus SchiltknechtDate: 2006-10-24 08:26:39
Subject: Re: Replication documentation addition
Previous:From: Bruce MomjianDate: 2006-10-24 04:20:40
Subject: Replication documentation addition

pgsql-patches by date

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

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