Re: Different Lock Behavior With Create and Drop Foreign Key

2020-04-10 Thread Tom Lane
Laurenz Albe writes: > On Fri, 2020-04-10 at 01:40 +, Virendra Kumar wrote: >> [ $subject ] > That is because foreign keys are implemented with system triggers, some of > which > are defined on the target table. > Now CREATE TRIGGER does not require an ACCESS EXCLUSIVE lock, but DROP > TRIG

Re: Different Lock Behavior With Create and Drop Foreign Key

2020-04-09 Thread Laurenz Albe
On Fri, 2020-04-10 at 01:40 +, Virendra Kumar wrote: > Here is test case. > > create table testx > ( > v_code character varying(32), > client_id bigint > ); > alter table testx add constraint testx_pkey primary key (v_code); > > create table testy > ( > dxid bigint, > v_co

Different Lock Behavior With Create and Drop Foreign Key

2020-04-09 Thread Virendra Kumar
Hi Team, Here is test case.create table testx (     v_code character varying(32),     client_id bigint ); alter table testx add constraint testx_pkey primary key (v_code); create table testy (     dxid bigint,     v_code character varying(32) ); alter table testy add constraint testy_pkey prim