Re: [PATCHES] WIP patch for tuple freezing issues

2006-11-05 Thread Heikki Linnakangas

Tom Lane wrote:

Attached is a draft patch for the WAL-and-freezing issues we've been
discussing.  This incorporates Heikki and Simon's work on providing
WAL-logging for tuple freezing actions and pg_clog truncation
respectively, and adds on several other things:


Looks good. Just a few notes:

The patch seems to make VACUUM FULL FREEZE combination valid again, 
which should be note in the docs.


This comment in vacuum.c:

/*
 * If we froze any tuples, mark the buffer dirty, and write a WAL
 * record recording the changes.  We must log the changes to be
 * crash-safe if we truncate clog at conclusion of the vacuum.
 */

is not accurate. As discussed earlier, a crash is a problem even if clog 
is not truncated by this vacuum, because relfrozenxid is updated anyway.


--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [PATCHES] WIP patch for tuple freezing issues

2006-11-05 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes:
 The patch seems to make VACUUM FULL FREEZE combination valid again, 
 which should be note in the docs.

Right, I haven't gotten around to fixing the VACUUM ref page yet but
this change is needed.  This is really fallout from Alvaro's previous
changes BTW: there is no longer any need for VACUUM FREEZE to try to
absolutely guarantee a fully-frozen table state.  All it is really doing
is guaranteeing there's nothing older than OldestXmin in there, and so
the fact that VACUUM FULL would put its own xid into the table isn't
a contradiction anymore.

BTW, I intend to say that FREEZE is deprecated in favor of the
equivalent of running VACUUM with vacuum_freeze_distance set to 0.
I'd like to remove it in 8.3 so as to get rid of one non-spec
reserved word.  Any objections?

 This comment in vacuum.c:

 /*
   * If we froze any tuples, mark the buffer dirty, and write a WAL
   * record recording the changes.  We must log the changes to be
   * crash-safe if we truncate clog at conclusion of the vacuum.
   */

 is not accurate.

OK, how about ... crash-safe against future truncation of clog.?

regards, tom lane

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq