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

From Alvaro Herrera
Subject Re: Preventing index scans for non-recoverable index AMs
Date
Msg-id 20081218002316.GM4453@alvh.no-ip.org
Whole thread Raw
In response to Re: Preventing index scans for non-recoverable index AMs  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Preventing index scans for non-recoverable index AMs
Re: Preventing index scans for non-recoverable index AMs
List pgsql-hackers
Simon Riggs wrote:
> 
> On Wed, 2008-12-17 at 18:01 -0500, Jaime Casanova wrote:
> > On Wed, Dec 17, 2008 at 5:54 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> > 
> > > We don't yet have a mechanism for an
> > > index AM to say "damn, this index is screwed up, don't use it".
> > 
> > mark pg_index.indisvalid and/or pg_index.indisready to false in the
> > hot standby node?
> 
> We can't edit the database until recovery is over, so that doesn't help
> us while in recovery mode. So not an option.

Maybe we should add a WAL record that's the physical representation for
"mark this index invalid", and have any transaction that modifies a hash
index write that to WAL.  It should be simple code to write, because
the underlying replay is based on a regular heap update.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: Summary: changes needed in function defaults behavior
Next
From: Simon Riggs
Date:
Subject: Re: Coding TODO for 8.4: Synch Rep