Re: CREATE TABLE (with INHERITS) and ACCESS EXCLUSIVE locks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas F(dot) O'Connell" <tfo(at)sitening(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CREATE TABLE (with INHERITS) and ACCESS EXCLUSIVE locks
Date: 2006-04-05 02:53:39
Message-ID: 23226.1144205619@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Thomas F. O'Connell" <tfo(at)sitening(dot)com> writes:
> I've brought this up to an extent in the past, but is there an easy
> way to extend section 12.3.1 (or create some form of appendix) such
> that it reveals all possible locking paths for SQL commands in
> postgres?

It's very simple: any form of schema alteration on a table takes
exclusive lock. Offhand the only exception I can remember is CREATE
INDEX, and frankly I'm not 100% sure that is a safe exception.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2006-04-05 02:59:05 Re: RAISE function misuse ?
Previous Message Jonel Rienton 2006-04-05 01:15:07 Re: [GENERAL] Duda, version para Solaris 10