From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | kuroda(dot)keisuke(at)nttcom(dot)co(dot)jp |
Cc: | vignesh C <vignesh21(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_get_indexdef() modification to use TxnSnapshot |
Date: | 2023-10-06 03:11:20 |
Message-ID: | 2869995.1696561880@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
kuroda(dot)keisuke(at)nttcom(dot)co(dot)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.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2023-10-06 05:18:16 | Re: Opportunistically pruning page before update |
Previous Message | kuroda.keisuke | 2023-10-06 03:01:13 | Re: pg_get_indexdef() modification to use TxnSnapshot |