Re: REINDEX CONCURRENTLY 2.0

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: REINDEX CONCURRENTLY 2.0
Дата
Msg-id 20150202141014.GA9201@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: REINDEX CONCURRENTLY 2.0  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: REINDEX CONCURRENTLY 2.0  (Robert Haas <robertmhaas@gmail.com>)
Re: [HACKERS] REINDEX CONCURRENTLY 2.0  (Andreas Karlsson <andreas@proxel.se>)
Список pgsql-hackers
On 2014-11-12 16:11:58 -0500, Robert Haas wrote:
> On Wed, Nov 12, 2014 at 4:10 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> > On Thu, Nov 6, 2014 at 9:50 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
> >> If REINDEX cannot work without an exclusive lock, we should invent some
> >> other qualifier, like WITH FEWER LOCKS.
> >
> > What he said.
> 
> But more to the point .... why, precisely, can't this work without an
> AccessExclusiveLock?  And can't we fix that instead of setting for
> something clearly inferior?

So, here's an alternative approach of how to get rid of the AEL
locks. They're required because we want to switch the relfilenodes
around. I've pretty much no confidence in any of the schemes anybody has
come up to avoid that.

So, let's not switch relfilenodes around.

I think if we should instead just use the new index, repoint the
dependencies onto the new oid, and then afterwards, when dropping,
rename the new index one onto the old one. That means the oid of the
index will change and some less than pretty grovelling around
dependencies, but it still seems preferrable to what we're discussing
here otherwise.

Does anybody see a fundamental problem with that approach?

Greetings,

Andres Freund

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Atri Sharma
Дата:
Сообщение: Re: Implementation of global temporary tables?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Redesigning checkpoint_segments