pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Hitesh Bhambhani <hitesh.bhambhani@asg.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #5599: Vacuum fails due to index corruption issues
Date: Thu, 05 Aug 2010 12:28:20 -0400
Message-ID: <1281025234-sup-1704@alvh.no-ip.org> (raw)
In-Reply-To: <1880.1281020817@sss.pgh.pa.us>
References: <201008042147.o74LlCge057659@wwwmaster.postgresql.org>
	<1280978913-sup-5475@alvh.no-ip.org>
	<8B7319E089E48047A0B688CE9CF54FD855C3C916@USRES8MAIL.asg.com>
	<1880.1281020817@sss.pgh.pa.us>

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



view thread (18+ messages)  latest in thread

Message-ID: <1281025234-sup-1704@alvh.no-ip.org>
Permalink:  ../1281025234-sup-1704@alvh.no-ip.org/
Also on:    postgresql.org/message-id/1281025234-sup-1704@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@commandprompt.com, tgl@sss.pgh.pa.us, hitesh.bhambhani@asg.com
  Subject: Re: BUG #5599: Vacuum fails due to index corruption issues
  In-Reply-To: <1281025234-sup-1704@alvh.no-ip.org>
  References: <201008042147.o74LlCge057659@wwwmaster.postgresql.org> <1280978913-sup-5475@alvh.no-ip.org> <8B7319E089E48047A0B688CE9CF54FD855C3C916@USRES8MAIL.asg.com> <1880.1281020817@sss.pgh.pa.us> <1281025234-sup-1704@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox