Re: Preventing index scans for non-recoverable index AMs - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: Preventing index scans for non-recoverable index AMs
Date
Msg-id 2e78013d0812180445k2cf95076ke3e05b2a2a22b8fa@mail.gmail.com
Whole thread Raw
In response to Re: Preventing index scans for non-recoverable index AMs  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Preventing index scans for non-recoverable index AMs  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Thu, Dec 18, 2008 at 6:02 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:

>
> In short, don't use hash index, unless you're prepared to run REINDEX
> manually after every crash.
>

I think that should be mentioned in *bold* letters in the
documentation. The doc currently has the following: "so hash indexes
might need to be rebuilt with REINDEX after a database crash" This
isn't a strong statement. How would we handle automatic recovery where
user may not even get chance to run REINDEX before his database is
corrupted ?

Hot standby will fail miserably with hash indexes since the index
would be completely useless at the standby (but planner will
nevertheless try to use it), IMHO either hash index should not be
supported at all or should be WAL logged and properly handled in
presence of hot standby.

BTW, if there is no proven case where hash index works significantly
better than btree (that's what the doc says), why not just completely
abandon it ?

Thanks,
Pavan

-- 
Pavan Deolasee
EnterpriseDB     http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Preventing index scans for non-recoverable index AMs
Next
From: Heikki Linnakangas
Date:
Subject: Re: Preventing index scans for non-recoverable index AMs