From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: lebedewwasya@gmail.com
Subject: 13.2.1. Read Committed Isolation Level
Date: Sun, 14 Jul 2024 06:17:37 +0000
Message-ID: <172093785742.736591.6600074945096543093@wrigleys.postgresql.org> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/16/transaction-iso.html
Description:
I don't understend this text.
'INSERT with an ON CONFLICT DO UPDATE clause behaves similarly. In Read
Committed mode, each row proposed for insertion will either insert or
update. Unless there are unrelated errors, one of those two outcomes is
guaranteed. If a conflict originates in another transaction whose effects
are not yet visible to the INSERT, the UPDATE clause will affect that row,
even though possibly no version of that row is conventionally visible to the
command.
INSERT with an ON CONFLICT DO NOTHING clause may have insertion not proceed
for a row due to the outcome of another transaction whose effects are not
visible to the INSERT snapshot. Again, this is only the case in Read
Committed mode.'
And specifically this part 'the UPDATE clause will affect that row, even
though possibly no version of that row is conventionally visible to the
command.' What does it mean that no version of that row is visible to the
command? Is this visibility related to xmin xmax values? Or does it mean
that the version of the row is not visible because it has not yet been
commited by a parallel transaction?
'If a conflict originates in another transaction whose effects are not yet
visible to the INSERT' - Does this mean that at the moment of starting the
INSERT statement, the parallel transaction has not yet been committed (or
even started after calling the INSERT statement), but at the time of
performing the action with a row in the INSERT statement, transaction 2 has
already committed its changes? Or does it mean that contrary to Read
Committed Isolation Level, uncommitted changes from a parallel transaction
can affect the execution of an INSERT command?
'INSERT with the ON CONFLICT DO NOTHING clause can result in the insertion
of a row not continuing due to the result of another transaction, whose
effects are not visible in the instantaneous snapshot of INSERT' - same
question.
Could you please describe this behavior in more detail?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, lebedewwasya@gmail.com
Subject: Re: 13.2.1. Read Committed Isolation Level
In-Reply-To: <172093785742.736591.6600074945096543093@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox