Re: Bugs in CREATE/DROP INDEX CONCURRENTLY
От | Andres Freund |
---|---|
Тема | Re: Bugs in CREATE/DROP INDEX CONCURRENTLY |
Дата | |
Msg-id | 20121128235229.GA16316@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: Bugs in CREATE/DROP INDEX CONCURRENTLY (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Bugs in CREATE/DROP INDEX CONCURRENTLY
Re: Bugs in CREATE/DROP INDEX CONCURRENTLY |
Список | pgsql-hackers |
On 2012-11-28 18:41:39 -0500, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > On 2012-11-28 17:42:18 -0500, Tom Lane wrote: > >> I agree it's a judgment call, though. Anybody want to argue for the > >> other position? > > > Hm. Seems odd to include indexes that are being dropped concurrently at > > that moment. But then, we can't really detect that situation and as you > > say its consistent with pg_dump... > > [ thinks about that for a bit... ] We could have that, for about the same > cost as the currently proposed patch: instead of defining the added flag > column as "index is live", define it as "drop in progress", and set it > immediately at the start of the DROP CONCURRENTLY sequence. Then the > "dead" condition that RelationGetIndexList must check for is "drop in > progress and not indisvalid and not indisready". You're right. > However, this is more complicated and harder to understand. So unless > somebody is really excited about being able to tell the difference > between create-in-progress and drop-in-progress, I'd rather leave the > patch as-is. The only real argument for doing this that I can see is a potential REINDEX CONCURRENTLY. Greetings, Andres Freund --Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: