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

From Tom Lane
Subject Re: Preventing index scans for non-recoverable index AMs
Date
Msg-id 25874.1229612234@sss.pgh.pa.us
Whole thread Raw
In response to Re: Preventing index scans for non-recoverable index AMs  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Greg Stark wrote:
>> It would be perfectly reasonable to add an amisrecoverable like Simon 
>> described. It could automatically set indisvalid to false after a crash 
>> and treat the index as if indisvalid is false during recovery. That 
>> would be a lot smoother and safer than what we have now.
>> 
>> It might even be possible to do this with a new wal record type so it 
>> only happens if there was a write to the index. I imagine most users who 
>> read that warning and use hash indexes anyways are using them on 
>> read-only tables where they know it's safe.

> This is essentially Alvaro's suggestions, which Simon has already given 
> a counterargument to.

The long and the short of it is that the reason hash indexes still don't
have WAL support is no one's seen fit to do the work.  I do not see the
point of proposing to expend work to substitute for that work.

I think all that ought to be done here is document that hash indexes
shouldn't be used in a replication or PITR environment.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Preventing index scans for non-recoverable index AMs
Next
From: Andrew Gierth
Date:
Subject: Re: uuids on freebsd