Re: BUG #5599: Vacuum fails due to index corruption issues - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #5599: Vacuum fails due to index corruption issues
Date
Msg-id 1281025234-sup-1704@alvh.no-ip.org
Whole thread Raw
In response to Re: BUG #5599: Vacuum fails due to index corruption issues  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5599: Vacuum fails due to index corruption issues
List pgsql-bugs
Excerpts from Tom Lane's message of jue ago 05 11:06:57 -0400 2010:

> Seems like we need to think harder about recovering from a truncate
> failure.  A few random ideas:

Ugh.

> 1. Write the dirty buffers before dropping them.  Kind of ugly from a
> performance viewpoint, but simple and safe.

I think "simple" is good, considering that this code is gone in 9.0 and
HEAD.  IMHO investing too much effort on this problem is not worth it.


Perhaps it'd be good to come up with a better solution for HEAD:

> 3. Don't discard the dirty buffers until after successfully truncating.
> The hard part here is to be sure no other process (like bgwriter) will
> try to write them in between.  I don't see a way to guarantee that,
> at least not without interlock infrastructure that doesn't exist today.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: string_agg delimiter having no effect with order by
Next
From: Tom Lane
Date:
Subject: Re: BUG #5599: Vacuum fails due to index corruption issues