Re: CREATE INDEX and HOT - revised design
От | Tom Lane |
---|---|
Тема | Re: CREATE INDEX and HOT - revised design |
Дата | |
Msg-id | 22876.1175183105@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: CREATE INDEX and HOT - revised design ("Florian G. Pflug" <fgp@phlo.org>) |
Ответы |
Re: CREATE INDEX and HOT - revised design
Re: CREATE INDEX and HOT - revised design |
Список | pgsql-hackers |
"Florian G. Pflug" <fgp@phlo.org> writes: > Pavan Deolasee wrote: >> Frankly I don't know this works, but are you sure that the plan will >> be used until the end of the session ? Even if thats the case, it can >> happen even today if we create a new index, but the existing sessions >> will use the stale plan (assuming what you said is true) > I've checked that: Evidently you weren't testing on HEAD. > The open question is how CVS HEAD with plan invalidation behaves. > If it replans after the index-creating transaction commits, then > basing index validity on a snapshot will break this, because upon > replay they index might not be useable, but later on it may very > well be (but that plan invalidation machinery won't realize that) It will replan at the first use of the plan after seeing the relcache inval sent by commit of the index-creating transaction. If you have two separate transactions to create an index and then mark it valid later, everything's fine because there are two inval events. However, if you design something where an index becomes usable due to the passage of time rather than an explicit mark-valid step, there's gonna be a problem. I'd suggest trying to stick to the way CREATE INDEX CONCURRENTLY does it... regards, tom lane
В списке pgsql-hackers по дате отправления: