Re: [HACKERS] Is there a way to temporarily disable a index

2014-07-11 Thread David Johnston
On Fri, Jul 11, 2014 at 12:12 PM, Michael Banck wrote: > On Fri, Jul 11, 2014 at 11:07:21AM -0400, Tom Lane wrote: > > David G Johnston writes: > > > Benedikt Grundmann wrote > > >> That is it possible to tell the planner that index is off limits > > >> i.e. > > >> don't ever generate a plan usi

Re: [HACKERS] Is there a way to temporarily disable a index

2014-07-11 Thread Michael Banck
On Fri, Jul 11, 2014 at 11:07:21AM -0400, Tom Lane wrote: > David G Johnston writes: > > Benedikt Grundmann wrote > >> That is it possible to tell the planner that index is off limits > >> i.e. > >> don't ever generate a plan using it? > > > Catalog hacking could work but not recommended (nor do

Re: [HACKERS] Is there a way to temporarily disable a index

2014-07-11 Thread Tom Lane
Andres Freund 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 upd

Re: [HACKERS] Is there a way to temporarily disable a index

2014-07-11 Thread Andres Freund
On 2014-07-11 11:20:08 -0400, Tom Lane wrote: > Andres Freund 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

Re: [HACKERS] Is there a way to temporarily disable a index

2014-07-11 Thread Tom Lane
Andres Freund 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 mi

Re: [HACKERS] Is there a way to temporarily disable a index

2014-07-11 Thread Andres Freund
On 2014-07-11 11:07:21 -0400, Tom Lane wrote: > David G Johnston writes: > > Benedikt Grundmann wrote > >> That is it possible to tell the planner that index is off limits i.e. > >> don't ever generate a plan using it? > > > Catalog hacking could work but not recommended (nor do I know the proper

Re: [HACKERS] Is there a way to temporarily disable a index

2014-07-11 Thread Tom Lane
David G Johnston writes: > Benedikt Grundmann wrote >> That is it possible to tell the planner that index is off limits i.e. >> don't ever generate a plan using it? > Catalog hacking could work but not recommended (nor do I know the proper > commands and limitations). Do you need the database/ta

Re: [HACKERS] Is there a way to temporarily disable a index

2014-07-11 Thread David G Johnston
Benedikt Grundmann wrote > That is it possible to tell the planner that index is off limits i.e. > don't > ever generate a plan using it? > > Rationale: Schema changes on big tables. I might have convinced myself / > strong beliefs that for all queries that I need to be fast the planner > does >

[HACKERS] Is there a way to temporarily disable a index

2014-07-11 Thread Benedikt Grundmann
That is it possible to tell the planner that index is off limits i.e. don't ever generate a plan using it? Rationale: Schema changes on big tables. I might have convinced myself / strong beliefs that for all queries that I need to be fast the planner does not need to use a given index (e.g. othe