CLUSTER not lose indexes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема CLUSTER not lose indexes
Дата
Msg-id Pine.LNX.4.44.0207042235580.16373-200000@cm-lcon-46-187.cm.vtr.net
обсуждение исходный текст
Ответы Re: CLUSTER not lose indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: CLUSTER not lose indexes  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Hackers:

I've modified commands/cluster.c so that it recreates the indexes on the
table after clustering the table.  I attach the patch.

There are (of course) things I don't understand.  For example, whether
(or when) I should use CommandCounterIncrement() after each
index_create, or if I should call setRelhasindex() only once (and not
once per index); or whether I need to acquire some lock on the indexes.

I tested it with one table and several indexes.  Truth is I don't know
how to test for concurrency, or if it's worth the trouble.

The purpose of this experiment (and, I hope, more to follow) is to
familiarize myself with the guts of PostgreSQL, so I can work on my CS
thesis with it.  If you can point me my misconceptions I'd be happy to
try again (and again, and...)

Thank you.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"La Primavera ha venido. Nadie sabe como ha sido" (A. Machado)

Вложения

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

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Wrap access to Oid II
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CLUSTER not lose indexes