PSQLException and lock issue when trigger added on table
问题 UPDATE: I eliminated Hibernate from the problem. I completely reworked description of problem to simplify it as much as possible. I have master table with noop trigger and detail table with two relations between master and detail table: create table detail ( id bigint not null, code varchar(255) not null, primary key (id) ); create table master ( id bigint not null, name varchar(255), detail_id bigint, -- "preferred" detail is one-to-one relation primary key (id), unique (detail_id), foreign