Re: Preventing index scans for non-recoverable index AMs

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Kenneth Marshall <ktm(at)rice(dot)edu>
Cc: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Preventing index scans for non-recoverable index AMs
Date: 2008-12-18 02:24:40
Message-ID: 1229567080.7879.17.camel@dell.linuxdev.us.dell.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2008-12-17 at 18:20 -0800, Jeff Davis wrote:
> On Wed, 2008-12-17 at 17:10 -0600, Kenneth Marshall wrote:
> > On Wed, Dec 17, 2008 at 06:07:41PM -0500, Jaime Casanova wrote:
> > > On Wed, Dec 17, 2008 at 5:47 PM, Kenneth Marshall <ktm(at)rice(dot)edu> wrote:
> > > > Rebuilding a hash index for the case
> > > > for which it is preferred (large, large tables) would be excrutiating.
> > > >
> > >
> > > there's such a situation?
> > >
> > As of 8.4, yes.
> >
>
> My understanding was that the hash index type never supported
> recoverability, and could require a rebuild on power failure.
>
> If it's not written to WAL before the data page changes, how could it be
> safe for recovery? The tuple inserts are logged, so during recovery the
> tuple would be put in the table but the index would not be updated.
>
> What am I missing?
>

On second read, it occurs to me that you may have meant: "as of 8.4,
hash indexes have never been safe" but I read it as: "as of 8.4, hash
indexes will require rebuild on crash, whereas that was unnecessary
before 8.4".

If you meant the former, you can disregard my question.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-12-18 02:28:46 Re: Preventing index scans for non-recoverable index AMs
Previous Message Simon Riggs 2008-12-18 02:23:10 Re: Preventing index scans for non-recoverable index AMs