Re: PATCH: Reducing lock strength of trigger and foreign key DDL

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: Reducing lock strength of trigger and foreign key DDL
Date: 2014-12-24 08:27:51
Message-ID: CAB7nPqTga_tor+6HFBUAfu5sPyOf+PH+101Wh23gjvh=tigQkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 14, 2014 at 5:45 AM, Andreas Karlsson <andreas(at)proxel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2014-12-24 08:54:20 Re: replicating DROP commands across servers
Previous Message Noah Misch 2014-12-24 07:56:31 Re: bin checks taking too long.