Re: All-visible pages with valid prune xid are confusing

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: All-visible pages with valid prune xid are confusing
Дата
Msg-id xaknzmkoz2nudbefkvw2kuaxew5pjexebzwh3ji2d4bx6a5uqa@iqgrggdlgb77
обсуждение исходный текст
Ответ на Re: All-visible pages with valid prune xid are confusing  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
Hi,

On 2025-12-02 21:39:42 +0200, Heikki Linnakangas wrote:
> On 02/12/2025 21:13, Melanie Plageman wrote:
> > In terms of finding some XID to set it to, could we do what updates
> > and deletes do and use the XLogRecord->xl_xid?
> 
> A prune record can have XLogRecord->xl_xid == InvalidTransactionId, if the
> transaction hasn't been assigned a transaction ID yet. I think
> ReadNextTransactionId() - 1 would work. (Using TransactionIdRetreat rather
> than plain - 1, of course)

I think it'd be preferrable if we just made the records large enough to
maintain the same pd_prune_xid on the standby as on the primary. The closer
the pages are on primary & standby the better, any allowed divergence makes it
harder to find bugs imo. In comparison to the space the relevant records use,
it doesn't seem like including an accurate prune xid would take a lot of
space?

Greetings,

Andres



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