Phantom Read anomaly in Oracle and PostgreSQL does not rollback transaction
I noticed the following occurrence in both Oracle and PostgreSQL. Considering we have the following database schema: create table post ( id int8 not null, title varchar(255), version int4 not null, primary key (id)); create table post_comment ( id int8 not null, review varchar(255), version int4 not null, post_id int8, primary key (id)); alter table post_comment add constraint FKna4y825fdc5hw8aow65ijexm0 foreign key (post_id) references post; With the following data: insert into post (title, version, id) values ('Transactions', 0, 1); insert into post_comment (post_id, review, version, id)