BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction
От | PG Bug reporting form |
---|---|
Тема | BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction |
Дата | |
Msg-id | 17368-98a4f99e8e4b4402@postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction
|
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 17368 Logged by: Alexander Lakhin Email address: exclusion@gmail.com PostgreSQL version: 14.1 Operating system: Ubuntu 20.04 Description: The isolation test "read-only-anomaly-3" modified as follows: setup { CREATE TABLE bank_account (id TEXT PRIMARY KEY, balance DECIMAL NOT NULL); INSERT INTO bank_account (id, balance) VALUES ('X', 0), ('Y', 0); } teardown { DROP TABLE bank_account; } session s1 setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } step s1ry { SELECT balance FROM bank_account WHERE id = 'Y'; } step s1wy { UPDATE bank_account SET balance = 20 WHERE id = 'Y'; } step s1c { COMMIT; } session s2 setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } step s2rx { SELECT balance FROM bank_account WHERE id = 'X'; } step s2ry { SELECT balance FROM bank_account WHERE id = 'Y'; } step s2wx { UPDATE bank_account SET balance = -11 WHERE id = 'X'; } step s2c { COMMIT; } session s3 setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE; } step s3r { SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id; } step s3c { COMMIT; } session s4 setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } step s4to { SET lock_timeout = '10ms' } step s4wx { UPDATE bank_account SET balance = -11 WHERE id = 'X'; } step s4c { COMMIT; } permutation s2rx s2ry s1ry s1wy s1c s3r s2wx s2c s3c permutation s2ry s1wy s1c s2wx s4to s4wx s4c s3r s2c s3c causes an assertion failure with the following stacktrace: Core was generated by `postgres: law isolation_regression [local] SELECT '. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007f53a8a7c859 in __GI_abort () at abort.c:79 #2 0x000055edb1e89381 in ExceptionalCondition (conditionName=0x55edb2832980 "SxactIsROSafe(MySerializableXact)", errorType=0x55edb2831da0 "FailedAssertion", fileName=0x55edb2831d60 "predicate.c", lineNumber=1612) at assert.c:69 #3 0x000055edb1714442 in GetSafeSnapshot (origSnapshot=0x55edb6ac6e40 <CurrentSnapshotData>) at predicate.c:1612 #4 0x000055edb1714b91 in GetSerializableTransactionSnapshot (snapshot=0x55edb6ac6e40 <CurrentSnapshotData>) at predicate.c:1703 #5 0x000055edb201d623 in GetTransactionSnapshot () at snapmgr.c:291 #6 0x000055edb17613b5 in exec_simple_query ( query_string=0x625000005220 "SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id;") at postgres.c:1103 #7 0x000055edb176ea2e in PostgresMain (argc=1, argv=0x7ffdfa7290d0, dbname=<optimized out>, username=0x629000011258 "law") at postgres.c:4486 #8 0x000055edb13ea951 in BackendRun (port=0x615000004900) at postmaster.c:4530 #9 0x000055edb13e9142 in BackendStartup (port=0x615000004900) at postmaster.c:4252 #10 0x000055edb13df0a3 in ServerLoop () at postmaster.c:1745 #11 0x000055edb13dcf20 in PostmasterMain (argc=8, argv=0x607000000170) at postmaster.c:1417 #12 0x000055edb0f075c3 in main (argc=8, argv=0x607000000170) at main.c:209
В списке pgsql-bugs по дате отправления: