Re: Reducing Catalog Locking - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Reducing Catalog Locking
Date
Msg-id CA+U5nM+syf2L=pzo0v_bkifKNS=vjOoDsDVqVanDEbUMvFMT9w@mail.gmail.com
Whole thread Raw
In response to Re: Reducing Catalog Locking  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 31 October 2014 13:39, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> I doubt that this can ever be safe, because it will effectively assume
> that all operations on catalog tables are done by code that knows that it
> is accessing a catalog.

> What about manual DML, or even DDL, on a catalog?

I've never really understood why you think its a good idea to allow
such commands.

It's pretty easy to see that can screw things up a million ways.

It would be easy enough to make the superuser check acquire the
BigCatalogLock before it does anything else. That way only the
superuser code path would be affected by the special case required to
get around that problem.

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: CREATE INDEX CONCURRENTLY?
Next
From: Andres Freund
Date:
Subject: Re: Reducing Catalog Locking