Re: Freezing is not WAL-logged

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: alvherre(at)commandprompt(dot)com, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Freezing is not WAL-logged
Date: 2006-10-20 13:58:46
Message-ID: 20061020135846.GX26892@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Oct 20, 2006 at 09:49:47AM +0100, Heikki Linnakangas wrote:
> Alvaro Herrera wrote:
> >Tom Lane wrote:
> >>"Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> writes:
> >>>I just noticed that freezing a tuple (in vacuumlazy.c) is not
> >>>WAL-logged.
> >>The theory is that this doesn't matter because the tuple is committed
> >>either way ... it's equivalent to a hint-bit update which we don'ton
> >>WAL-log either.
> >
> >Also it'd be hugely expensive to log each freeze operation. The
> >alternative would be to log a VACUUM FREEZE, but that has the potential
> >to cause enormous recovery runtime.
>
> Freezing isn't very common, and a single WAL record per page would be
> enough. I can write the patch.
>
> It does have the potential to increase recovery times, but I don't think
> we can just cross our fingers and hope that no crash happens after
> freezing some tuples.

If we're worried enough about the recovery time, AFAIK it should be safe
to fire off a background process to freeze the table and let the rest of
recovery proceed. Perhaps it wouldn't be too difficult to have
autovacuum do this, though we'd have to decide what to do if it was
disabled.
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2006-10-20 13:59:33 Re: Freezing is not WAL-logged
Previous Message Tom Lane 2006-10-20 13:53:08 Re: Freezing is not WAL-logged