Re: Preserve attstattarget on REINDEX CONCURRENTLY

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Preserve attstattarget on REINDEX CONCURRENTLY
Дата
Msg-id YB82yLaFVmJblvKE@paquier.xyz
обсуждение исходный текст
Ответ на Re: Preserve attstattarget on REINDEX CONCURRENTLY  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: Preserve attstattarget on REINDEX CONCURRENTLY  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Sat, Feb 06, 2021 at 10:39:53PM +0100, Tomas Vondra wrote:
> Copying this info in index_concurrently_swap seems a bit strange - we're
> copying other stuff there, but this is modifying something we've already
> copied before. I understand why we do it there to make this backpatchable,
> but maybe it'd be good to mention this in a comment (or at least the commit
> message). We could do this in the backbranches only and the "correct" way in
> master, but that does not seem worth it.

Thanks.

> One minor comment - the code says this:
>
>     /* no need for a refresh if both match */
>     if (attstattarget == att->attstattarget)
>         continue;
>
> Isn't that just a different way to say "attstattarget is not default")?

For REINDEX CONCURRENTLY, yes.  I was thinking here about the case
where this code is used for other purposes in the future, where
attstattarget may not be -1.

I'll see about applying this stuff after the next version is tagged
then.
--
Michael

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug in query rewriter - hasModifyingCTE not getting set
Следующее
От: Kasahara Tatsuhito
Дата:
Сообщение: Re: There doesn't seem to be any case where PQputCopyEnd() returns 0