Re: Buffer locking is special (hints, checksums, AIO writes)
| От | Andres Freund |
|---|---|
| Тема | Re: Buffer locking is special (hints, checksums, AIO writes) |
| Дата | |
| Msg-id | aYtg622xasbSju7_@alap3.anarazel.de обсуждение исходный текст |
| Ответ на | Re: Buffer locking is special (hints, checksums, AIO writes) (Antonin Houska <ah@cybertec.at>) |
| Ответы |
Re: Buffer locking is special (hints, checksums, AIO writes)
|
| Список | pgsql-hackers |
Hi, On 2026-02-10 08:46:27 +0100, Antonin Houska wrote: > Andres Freund <andres@anarazel.de> wrote: > > I think we ought to instead restrict the page-at-a-time scans to only happen > > with "real" mvcc snapshots. I.e. this: > > > > /* > > * Disable page-at-a-time mode if it's not a MVCC-safe snapshot. > > */ > > if (!(snapshot && IsMVCCSnapshot(snapshot))) > > scan->rs_base.rs_flags &= ~SO_ALLOW_PAGEMODE; > > > > should trigger for historic snapshots as well. > > I suppose you mean changing it to > > if (!(snapshot && IsMVCCSnapshot(snapshot) && > !IsHistoricMVCCSnapshot(snapshot))) > scan->rs_base.rs_flags &= ~SO_ALLOW_PAGEMODE; Yes. For something committable, I think we should probably split IsMVCCSnapshot into IsMVCCSnapshot(), just accepting SNAPSHOT_MVCC, and IsMVCCLikeSnapshot() accepting both SNAPSHOT_MVCC and SNAPSHOT_HISTORIC_MVCC. And then go through all the existing callers of IsMVCCSnapshot() - only about half should stay as-is, I think. > > Does that fix the issue for you? > > Yes, with this change, I don't hit the problem anymore. Great! Greetings, Andres Freund
В списке pgsql-hackers по дате отправления: