Re: reindex concurrently and two toast indexes

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: reindex concurrently and two toast indexes
Дата
Msg-id 20200304051510.GE2593@paquier.xyz
обсуждение исходный текст
Ответ на Re: reindex concurrently and two toast indexes  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: reindex concurrently and two toast indexes  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
On Tue, Mar 03, 2020 at 06:25:51PM +0900, Michael Paquier wrote:
> Or actually, a more simple solution is to abuse of the two existing
> routines so as the dependency switch is done the other way around,
> from the new index to the old one.  That would visibly work because
> there is no CCI between each scan, and that's faster because the scan
> of pg_depend is done only on the entries in need of an update.  I'll
> look at that again tomorrow, it is late here and I may be missing
> something obvious.

It was a good inspiration.  I have been torturing this patch today and
played with it by injecting elog(ERROR) calls in the middle of reindex
concurrently for all the phases, and checked manually the handling of
entries in pg_depend for the new and old indexes, and these correctly
map.  So this is taking care of your problem.  Attached is an updated
patch with an updated comment about the dependency of this code with
CCIs.  I'd like to go fix this issue first.
--
Michael

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Следующее
От: Chris Bandy
Дата:
Сообщение: Re: [PATCH] Add schema and table names to partition error