From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Isolation of table creation |
Date: | 2015-12-11 08:46:11 |
Message-ID: | CAPpHfdvQt3Fm5t42XGEwXqsdN1UMxVK12mYd4she6O6pGjiBJA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hackers,
I discovered interesting issue with PostgreSQL transaction isolation.
When transaction is in repeatable read isolation level, I can't see table
which was created after transaction obtained snapshot. But I can run DML
statements with this table. See example below.
Session 1
# begin transaction isolation level repeatable read;
BEGIN
# \dt
No relations found.
Session 2
# create table tmp (i int not null);
CREATE TABLE
# insert into tmp values (1);
INSERT 0 1
# \dt
No relations found.
# select * from tmp;
i
---
(0 rows)
# insert into tmp values (2);
INSERT 0 1
# select * from tmp;
i
---
2
(1 row)
# commit;
COMMIT
Is it a bug?
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-12-11 08:49:16 | Re: Isolation of table creation |
Previous Message | Michael Paquier | 2015-12-11 08:12:43 | Re: Making tab-complete.c easier to maintain |