From: | Luka Žitnik <luka(dot)zitnik(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Unexpected serialization error |
Date: | 2021-02-12 18:14:17 |
Message-ID: | CAEXuP_U743JdQxnPXL7xWu9ODyY0Xz2wnO0O_nokQnb++foswg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi guys,
I had no luck over at general slack channel. So I'm beginning to treat this
as a bug. Here's a test case that unexpectedly fails at last insert. I
expect it not to fail because the rows that the two transactions act on are
unrelated to one another.
CREATE TABLE t1 (
class integer NOT NULL
);
CREATE INDEX ON t1 (class);
CREATE TABLE t2 (
class integer NOT NULL
);
CREATE INDEX ON t2 (class);
ALTER SYSTEM SET enable_seqscan TO off;
-- Session 1
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SELECT * FROM t2 WHERE class=1;
-- Session 2
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SELECT * FROM t1 WHERE class=2;
INSERT INTO t2 VALUES(2);
COMMIT;
-- Session 1
INSERT INTO t1 VALUES(1);
COMMIT;
Postgres version is PostgreSQL 12.5 on x86_64-pc-linux-musl, compiled by
gcc (Alpine 9.3.0) 9.3.0, 64-bit.
-- Lule
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2021-02-12 18:34:43 | Re: BUG #16862: Unexpected result of checking for null "IS NOT NULL" in function |
Previous Message | Tom Lane | 2021-02-12 18:11:53 | Re: BUG #16862: Unexpected result of checking for null "IS NOT NULL" in function |