pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18118: bug report for COMMIT AND CHAIN feature
2+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2023-09-22 48e2b234f8 227c7cf156 7cabb20a95 555a8d9d37 77dc816027 10323f140f Fix COMMIT/ROLLBACK AND CHAIN in the presence of subtransactions.
* BUG #18118: bug report for COMMIT AND CHAIN feature
@ 2023-09-20 09:31 PG Bug reporting form <noreply@postgresql.org>
2023-09-21 06:41 ` Re: BUG #18118: bug report for COMMIT AND CHAIN feature Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2023-09-20 09:31 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: evan.lx@alibaba-inc.com
The following bug has been logged on the website:
Bug reference: 18118
Logged by: Liu Xiang
Email address: evan.lx@alibaba-inc.com
PostgreSQL version: 14.9
Operating system: centos7
Description:
COMMIT(280a408b48d5ee42969f981bceb9e9426c3a344c) provides a way to support
chained commits. During recent development, I found that it left a flaw.
The defect can be reproduced as follows:
START TRANSACTION ISOLATION LEVEL SERIALIZABLE; COMMIT;
START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; savepoint s\; COMMIT AND
CHAIN;
SHOW transaction_isolation; -- transaction is active at this point
COMMIT;
will get:
postgres=*# SHOW transaction_isolation; -- transaction is active at this
point
transaction_isolation
-----------------------
serializable
(1 row)
The reason for this bug is that in the case of
CommitTransactionCommand->TBLOCK_SUBCOMMIT, if there is a sub-transaction,
only RestoreTransactionCharacteristics will be performed instead of
SaveTransactionCharacteristics; this results in a global variable
save_XactIsoLevel remaining from the previous transaction being restored in
the transaction.
Thank you to the community for your continued help
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #18118: bug report for COMMIT AND CHAIN feature
2023-09-20 09:31 BUG #18118: bug report for COMMIT AND CHAIN feature PG Bug reporting form <noreply@postgresql.org>
@ 2023-09-21 06:41 ` Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 0 replies; 2+ messages in thread
From: Laurenz Albe @ 2023-09-21 06:41 UTC (permalink / raw)
To: evan.lx@alibaba-inc.com; pgsql-bugs@lists.postgresql.org
On Wed, 2023-09-20 at 09:31 +0000, PG Bug reporting form wrote:
> PostgreSQL version: 14.9
> Operating system: centos7
> Description:
>
> COMMIT(280a408b48d5ee42969f981bceb9e9426c3a344c) provides a way to support
> chained commits. During recent development, I found that it left a flaw.
>
> The defect can be reproduced as follows:
>
> START TRANSACTION ISOLATION LEVEL SERIALIZABLE; COMMIT;
> START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; savepoint s\; COMMIT AND
> CHAIN;
> SHOW transaction_isolation; -- transaction is active at this point
> COMMIT;
>
> will get:
> postgres=*# SHOW transaction_isolation; -- transaction is active at this
> point
> transaction_isolation
> -----------------------
> serializable
> (1 row)
I tried to reproduce that and failed, both with v14 and v16.
For me, "transaction_isolation" is "repeatable read".
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-09-21 06:41 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-09-20 09:31 BUG #18118: bug report for COMMIT AND CHAIN feature PG Bug reporting form <noreply@postgresql.org>
2023-09-21 06:41 ` Laurenz Albe <laurenz.albe@cybertec.at>
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