Re: Is there a way to temporarily disable a index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is there a way to temporarily disable a index
Date: 2014-07-11 15:26:21
Message-ID: 3647.1405092381@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2014-07-11 11:20:08 -0400, Tom Lane wrote:
>> 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...

I still think the risk is minimal, but if the OP was worried about this
he could take out an AccessExclusive lock on the parent table for long
enough to commit the pg_index change.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2014-07-11 15:27:27 Re: Allow multi-byte characters as escape in SIMILAR TO and SUBSTRING
Previous Message Andres Freund 2014-07-11 15:23:53 Re: Is there a way to temporarily disable a index