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

From Michael Paquier
Subject Re: PATCH: Reducing lock strength of trigger and foreign key DDL
Date
Msg-id CAB7nPqTga_tor+6HFBUAfu5sPyOf+PH+101Wh23gjvh=tigQkg@mail.gmail.com
Whole thread Raw
In response to PATCH: Reducing lock strength of trigger and foreign key DDL  (Andreas Karlsson <andreas@proxel.se>)
Responses Re: PATCH: Reducing lock strength of trigger and foreign key DDL
List pgsql-hackers
On Sun, Dec 14, 2014 at 5:45 AM, Andreas Karlsson <andreas@proxel.se> wrote:
> get_rule_expr() relies heavily on the catcache which to me does not look
> like it could easily be (and probably not even should be) made to use the
> current snapshot. Refactoring ruleutils.c to rely less no the catcache seems
> like a reasonable thing to do if we want to reduce weirdness of how it
> ignores MVCC but it is quite a bit of work and I fear it could give us
> performance regressions.
> Do you have any ideas for how to fix get_rule_expr()?
Agreed. There are 20 calls to SearchSysCache in ruleutils.c, let's not
focus on that for now though and get things right for this patch.

> Is this patch worthwhile even without reducing the lock levels of the drop commands?
Yes. IMV, it is better to do this work slowly and incrementally.

Here are some comments about this patch:
1) There is no documentation. Could you update mvcc.sgml for SHARE ROW
EXCLUSIVE?
2) Some isolation tests would be welcome, the point of the feature is
to test if SELECT and SELECT FOR SHARE/UPDATE are allowed while
running one of the command mentioned above.
3) This patch breaks the isolation test alter-table-1.
Regards,
--
Michael



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: bin checks taking too long.
Next
From: David Rowley
Date:
Subject: Re: replicating DROP commands across servers