| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Antonin Houska <ah(at)cybertec(dot)at> |
| Cc: | Kirill Reshke <reshkekirill(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
| Subject: | Re: Buffer locking is special (hints, checksums, AIO writes) |
| Date: | 2026-03-13 17:55:55 |
| Message-ID: | 3ekkshczkcnqapdjefookcooolssvcxfpyblp7smafj7pqvzbw@3s523xthb56r |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On 2026-03-13 16:01:40 +0100, Antonin Houska wrote:
> Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> > Probably need to update the comments a bit. What about something like
> >
> >
> > /*
> > * Is the snapshot implemented as an MVCC snapshot (i.e. it uses
> > * SNAPSHOT_MVCC). If so, there will be at most be one visible row in a chain
> > * of updated tuples, and each visible tuple will be seen exactly once.
> > */
> > #define IsMVCCSnapshot(snapshot) \
>
> The ", and each visible tuple ..." part seemed to me redundant, so I omitted
> it. If you think I'm wrong, please add it yourself when committing the patch.
It's relevant in that many non-mvcc scan types do *not* guarantee that (i.e. a
tuple may never be seen, e.g. because the new version of the tuple is placed
before the current scan position of a scan and the old version of the tuple is
not considered visible anymore).
> I also added a comment to the IsHistoricMVCCSnapshot(), trying to explain what
> "historic" means.
Good idea.
Pushed with slightly revised comments and a different commit message (I
thought it was important to explain that this fixes breakage during logical
decoding, even if currently hard to reach).
Thanks for the report and patch!
- Andres
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jacob Champion | 2026-03-13 17:59:23 | Re: [oauth] Stabilize the libpq-oauth ABI (and allow alternative implementations?) |
| Previous Message | Andres Freund | 2026-03-13 17:54:48 | Re: tid_blockno() and tid_offset() accessor functions |