BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Дата
Msg-id 17385-9ee529fb091f0ce5@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end  (Dmitry Koval <d.koval@postgrespro.ru>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17385
Logged by:          Andrew Bille
Email address:      andrewbille@gmail.com
PostgreSQL version: 14.1
Operating system:   Ubuntu 20.04
Description:

Hi!

"RESET transaction_isolation" inside serializable transaction causes Assert
at the transaction end.
For example (on REL_10_STABLE) the following query:
CREATE TABLE abc (a int);
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
        SELECT * FROM abc;
        RESET transaction_isolation;
END;

causes an assertion failure with the following stack:

[New LWP 839017]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `postgres: andrew regression [local] COMMIT
                        '.
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  0x00007f14b7f59859 in __GI_abort () at abort.c:79
#2  0x00005586da82c4d2 in ExceptionalCondition (conditionName=0x5586daa01e42
"IsolationIsSerializable()", errorType=0x5586daa0195c "FailedAssertion",
fileName=0x5586daa01950 "predicate.c", lineNumber=4838) at assert.c:69
#3  0x00005586da659b2f in PreCommit_CheckForSerializationFailure () at
predicate.c:4838
#4  0x00005586da20f32e in CommitTransaction () at xact.c:2168
#5  0x00005586da21020c in CommitTransactionCommand () at xact.c:3015
#6  0x00005586da66afcb in finish_xact_command () at postgres.c:2721
#7  0x00005586da668643 in exec_simple_query (query_string=0x5586dada1020
"END;") at postgres.c:1239
#8  0x00005586da66d4db in PostgresMain (argc=1, argv=0x7fffefd1c050,
dbname=0x5586dadcc168 "regression", username=0x5586dadcc148 "andrew") at
postgres.c:4486
#9  0x00005586da591be3 in BackendRun (port=0x5586dadc2010) at
postmaster.c:4530
#10 0x00005586da59143e in BackendStartup (port=0x5586dadc2010) at
postmaster.c:4252
#11 0x00005586da58d233 in ServerLoop () at postmaster.c:1745
#12 0x00005586da58c990 in PostmasterMain (argc=3, argv=0x5586dad9b240) at
postmaster.c:1417
#13 0x00005586da47be9d in main (argc=3, argv=0x5586dad9b240) at main.c:209

Reproduced on REL_10_STABLE..master.
However SET transaction_isolation='read committed' inside transaction just
emits
"ERROR:  SET TRANSACTION ISOLATION LEVEL must be called before any query".

Regards, Andrew!


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Pragati Agarwal
Дата:
Сообщение: Postgresql error : PANIC: could not locate a valid checkpoint record
Следующее
От: "ideriha.takeshi@fujitsu.com"
Дата:
Сообщение: RE: The follwing error sometimes happened while updating partitioned table using inheritance; ERROR: attribute xxx of type record has wrong type