Re: Temporary tables versus wraparound... again

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Temporary tables versus wraparound... again
Дата
Msg-id CAM-w4HNVtjSzZSTCcDECeTDFq3achdvJXPnJ_9f=H71mixVWvA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Temporary tables versus wraparound... again  (Andres Freund <andres@anarazel.de>)
Ответы Re: Temporary tables versus wraparound... again  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Tue, 6 Dec 2022 at 13:59, Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> On 2022-12-06 13:47:39 -0500, Greg Stark wrote:
> > So.... I talked about this patch with Ronan Dunklau and he had a good
> > question.... Why are we maintaining relfrozenxid and relminmxid in
> > pg_class for temporary tables at all? Autovacuum can't use them and
> > other sessions won't care about them. The only session that might care
> > about them is the one attached to the temp schema.
>
> Uh, without relfrozenxid for temp tables we can end up truncating clog
> "ranges" away that are required to access the temp tables. So this would
> basically mean that temp tables can't be used reliably anymore.

True, we would have to have some other mechanism for exporting the
frozenxid that the session needs. Presumably that would be something
in PGProc like the xmin and other numbers. It could be updated by
scanning our local hash table whenever a transaction starts. This also
probably is what would be needed for multixacts I guess?


-- 
greg



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: predefined role(s) for VACUUM and ANALYZE
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: predefined role(s) for VACUUM and ANALYZE