Re: Is there a way to temporarily disable a index - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Is there a way to temporarily disable a index
Date
Msg-id 20140711152353.GB11292@awork2.anarazel.de
Whole thread Raw
In response to Re: Is there a way to temporarily disable a index  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Is there a way to temporarily disable a index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2014-07-11 11:20:08 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > On 2014-07-11 11:07:21 -0400, Tom Lane wrote:
> >> Hacking pg_index.indisvalid could work, given a reasonably recent PG.
> >> I would not try it in production until I'd tested it ;-)
> 
> > Works, but IIRC can cause problems at least < 9.4 because concurrent
> > cache builds might miss the pg_index row...
> 
> If you're talking about SnapshotNow hazards, I think the risk would be
> minimal, and probably no worse than cases that the system will cause
> by itself.

Yes, SnapshotNow. I could reproduce it causing 'spurious' HOT updates
and missing index inserts a while back. And I don't think it's
comparable with normal modifications. Those either have a modification
blocking lock or use heap_inplace...

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is there a way to temporarily disable a index
Next
From: Tom Lane
Date:
Subject: Re: Is there a way to temporarily disable a index