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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: [PATCHES] WAL logging freezing


  • From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
  • To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, <pgsql-hackers(at)postgresql(dot)org>, <pgsql-patches(at)postgresql(dot)org>
  • Subject: Re: [PATCHES] WAL logging freezing
  • Date: Tue, 31 Oct 2006 00:58:40 +0000
  • Message-id: <1162256320(dot)11568(dot)467(dot)camel(at)silverbirch(dot)site>

On Mon, 2006-10-30 at 19:18 -0500, Tom Lane wrote:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> > I don't agree: If the truncation points are at 1 million, 2 million etc,
> > then if we advance the relvacuumxid from 1.2 million to 1.5 million,
> > then crash, the hints bits for that last vacuum are lost. Sounds bad,
> > but we have not truncated clog, so there is no danger.
> 
> You're still wrong though. 

Frequently, I'd say :-)

>  Suppose that VACUUM moves a particular rel's
> relvacuumxid from 1.9 to 2.1 million, but because this rel is not
> currently the oldest vacuumxid, it doesn't truncate clog.  Then we crash
> and lose hint bits, but not the relvacuumxid change.  Then VACUUM
> vacuums some other rel and advances its relvacuumxid from 1.9 to 2.1
> million --- but this time that *was* the globally oldest value, and now
> we think we can truncate clog at 2 million.  But the first rel might
> still have some unhinted xids around 1.9 million.

That was understood; in the above example I agree you need to flush. If
you don't pass a truncation point, you don't need to flush whether or
not you actually truncate. So we don't need to flush *every* time, so
IMHO we don't need to play safe and keep clog the size of an iceberg.

Anyway, if PITR is safe again, I'd like to sleep....zzzzzzzzzzzzzz

-- 
  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group