Re: Reducing Catalog Locking

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reducing Catalog Locking
Date: 2014-10-31 14:44:58
Message-ID: CA+U5nM+syf2L=pzo0v_bkifKNS=vjOoDsDVqVanDEbUMvFMT9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31 October 2014 13:39, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-10-31 14:49:40 Re: Reducing Catalog Locking
Previous Message Greg Stark 2014-10-31 14:43:22 Re: CREATE INDEX CONCURRENTLY?