Re: PATCH: Reducing lock strength of trigger and foreign key DDL - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: PATCH: Reducing lock strength of trigger and foreign key DDL
Date
Msg-id 54C16C40.5070805@proxel.se
Whole thread Raw
In response to Re: PATCH: Reducing lock strength of trigger and foreign key DDL  (Noah Misch <noah@leadboat.com>)
Responses Re: PATCH: Reducing lock strength of trigger and foreign key DDL
List pgsql-hackers
On 01/20/2015 10:08 AM, Noah Misch wrote:
> Fair enough.  It did reinforce pg_get_constraintdef() as a subroutine of
> pg_dump rather than an independent, rigorous interface.  It perhaps made the
> function worse for non-pg_dump callers.  In that vein, each one of these hacks
> has a cost.  One could make a reasonable argument that ALTER TRIGGER RENAME
> locking is not important enough to justify spreading the hack from
> pg_get_constraintdef() to pg_get_triggerdef().  Lowering the CREATE TRIGGER
> lock level does not require any ruleutils.c change for the benefit of pg_dump,
> because pg_dump won't see the pg_trigger row of a too-recent trigger.

I agree with this view, and am not sure myself that it is worth lowering
the lock level of ALTER TRIGGER RENAME. I have attached a patch without
the changes to ALTER TRIGGER and ruleutils.c and also fixes the comment
issues noted by Andres.

--
Andreas Karlsson

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal: knowing detail of config files via SQL
Next
From: Stephen Frost
Date:
Subject: Re: basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe?