Re: Correcting freeze conflict horizon calculation
От | Peter Geoghegan |
---|---|
Тема | Re: Correcting freeze conflict horizon calculation |
Дата | |
Msg-id | CAH2-WznqnZmybtxKyqbO90s7hRHeq4Wgj4kEOPExO0LYXs2o1g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Correcting freeze conflict horizon calculation (Melanie Plageman <melanieplageman@gmail.com>) |
Список | pgsql-hackers |
On Fri, May 30, 2025 at 5:16 PM Melanie Plageman <melanieplageman@gmail.com> wrote: > On Thu, May 29, 2025 at 11:37 AM Peter Geoghegan <pg@bowt.ie> wrote: > > How can taking the "Avoids false conflicts when hot_standby_feedback > > in use" path more often result in fewer unnecessary conflicts on > > standbys? Isn't it the other way around? > > You're right. I forgot that the visibility_cutoff_xid will be older > than OldestXmin when all the tuples are going to be frozen. I added an assertion in a number of places that "Assert(!TransactionIdIsValid(visibility_cutoff_xid))" when we go to set a page all-frozen in the VM -- it's irrelvant, and recovery cannot possibly need a conflict when it replays the record. This seemed logical, since an all-frozen page must already be visible to every possible MVCC snapshot (it might also have some small performance benefit, though that's not really why I did it). > I associate the visibility_cutoff_xid with being younger/newer than > OldestXmin because it often will be when there are newer live tuples > we don't freeze. I'm not sure what you mean by this. visibility_cutoff_xid can only be set using tuples that HTSV says are HEAPTUPLE_LIVE according to VACUUM's OldestXmin cutoff. Personally I find it natural to think of visibility_cutoff_xid as meaningless unless we're actually able to apply it in some way. -- Peter Geoghegan
В списке pgsql-hackers по дате отправления: