Re: pg_get_indexdef() modification to use TxnSnapshot

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pg_get_indexdef() modification to use TxnSnapshot
Дата
Msg-id CA+TgmobiBg10QsxzSm+HdhwjJ6KG-HV89EMkeLcNjnF64tUZ-A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_get_indexdef() modification to use TxnSnapshot  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Oct 5, 2023 at 11:15 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> kuroda.keisuke@nttcom.co.jp writes:
> > On 2023-06-14 15:31, vignesh C wrote:
> >> I have attempted to convert pg_get_indexdef() to use
> >> systable_beginscan() based on transaction-snapshot rather than using
> >> SearchSysCache().
>
> Has anybody thought about the fact that ALTER TABLE ALTER TYPE
> (specifically RememberIndexForRebuilding) absolutely requires seeing
> the latest version of the index's definition?
>
> >>> it would be going to be a large refactoring and potentially make the
> >>> future implementations such as pg_get_tabledef() etc hard. Have you
> >>> considered changes to the SearchSysCache() family so that they
> >>> internally use a transaction snapshot that is registered in advance.
>
> A very significant fraction of other SearchSysCache callers likewise
> cannot afford to see stale data.  We might be able to fix things so
> that the SQL-accessible ruleutils functionality works differently, but
> we can't just up and change the behavior of cache lookups everywhere.

This patch was registered in the CommitFest as a bug fix, but I think
it's a much more significant change than that label applies, and it
seems like we have no consensus on what the right design is.

Since there's been no response to these (entirely valid) comments from
Tom in the past 3 months, I've marked this CF entry RwF for now.

--
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Eric Hanson
Дата:
Сообщение: Re: SET ROLE x NO RESET
Следующее
От: Robert Haas
Дата:
Сообщение: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG