Re: Correcting freeze conflict horizon calculation

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Correcting freeze conflict horizon calculation
Дата
Msg-id CAH2-Wz=91zUk-t-cuNcak7YRPwdGypmhT4bT7Zeqd3V1pXmtZQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Correcting freeze conflict horizon calculation  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On Mon, Jun 2, 2025 at 4:00 PM Melanie Plageman
<melanieplageman@gmail.com> wrote:
> I think, however, that I can't avoid keeping a separate counter for
> the horizon for the VM record. Pruning and freezing horizon is the
> newest "modified" (pruned or frozen) tuple xid, whereas the VM record
> needs the newest live committed tuple's xmin <= OldestXmin. So,
> perhaps maintaining multiple counters is unavoidable.

Unlike pruning of dead tuples, freezing doesn't always happen to the
maximum possible extent that OldestXmin will allow. Presumably you'll
want to keep the ability to delay the decision to freeze or not freeze
until the last possible moment. I think that supporting that
requirement necessitates using multiple conflict horizon counters (you
don't know which one you'll end up using until the last possible
moment).

> So, I wasn't actually planning (originally) to write a patch to try
> and change the horizon to make it older in more cases when it's
> correct. I'm trying to figure out the most straightforward code to
> calculate the combined snapshot conflict horizon for a prune/freeze/vm
> update record.

I figured that that was what this was really about.

--
Peter Geoghegan



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