Re: Support for REINDEX CONCURRENTLY

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Support for REINDEX CONCURRENTLY
Дата
Msg-id 201210090008.38876.andres@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Support for REINDEX CONCURRENTLY  (Jim Nasby <jim@nasby.net>)
Ответы Re: Support for REINDEX CONCURRENTLY
Список pgsql-hackers
On Monday, October 08, 2012 11:57:46 PM Jim Nasby wrote:
> On 10/5/12 9:57 PM, Michael Paquier wrote:
> > In the current version of the patch, at the beginning of process a new
> > index is created. It is a twin of the index it has to replace, meaning
> > that it copies the dependencies of old index and creates twin entries of
> > the old index even in pg_depend and pg_constraint also if necessary. So
> > the old index and the new index have exactly the same data in catalog,
> > they are completely decoupled, and you do not need to worry about the
> > OID replacements and the visibility consequences.
> 
> Yeah, what's the risk to renaming an index during concurrent access? The
> only thing I can think of is an "old" backend referring to the wrong index
> name in an elog. That's certainly not great, but could possibly be dealt
> with.
We cannot have two indexes with the same oid in the catalog, so the two 
different names will have to have different oids. Unfortunately the indexes oid 
is referred to by other tables (e.g. pg_constraint), so renaming the indexes 
while differering in the oid isn't really helpful :(...

Right now I don't see anything that would make switching oids easier than 
relfilenodes.

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



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Support for REINDEX CONCURRENTLY
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: sortsupport for text