public inbox for [email protected]
help / color / mirror / Atom feedQuestion about MVCC caveats
2+ messages / 2 participants
[nested] [flat]
* Question about MVCC caveats
@ 2025-11-13 19:30 Jim Nasby <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Jim Nasby @ 2025-11-13 19:30 UTC (permalink / raw)
To: pgsql-general
At [1], the docs state that table rewrite ALTERs result in the relation
appearing empty after the ALTER if another transaction had already taken a
snapshot before the ALTER. A simple test with a repeatable read (or
serializable) transaction confirms this... but is there any other situation
where a snapshot would be taken?
1: https://www.postgresql.org/docs/current/mvcc-caveats.html
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Question about MVCC caveats
@ 2025-11-13 22:10 Laurenz Albe <[email protected]>
parent: Jim Nasby <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Laurenz Albe @ 2025-11-13 22:10 UTC (permalink / raw)
To: Jim Nasby <[email protected]>; pgsql-general
On Thu, 2025-11-13 at 13:30 -0600, Jim Nasby wrote:
> At [1], the docs state that table rewrite ALTERs result in the relation appearing
> empty after the ALTER if another transaction had already taken a snapshot before
> the ALTER. A simple test with a repeatable read (or serializable) transaction
> confirms this... but is there any other situation where a snapshot would be taken?
Snapshots are taken at the start of a statement (or, with REPEATABLE READ and
SERIALIZABLE) at the beginning of the first statement in the transaction.
What do you mean with an "other" situation?
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-11-13 22:10 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-11-13 19:30 Question about MVCC caveats Jim Nasby <[email protected]>
2025-11-13 22:10 ` Laurenz Albe <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox