CREATE TRIGGER locking

From: Neil Conway <neilc(at)samurai(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: CREATE TRIGGER locking
Date: 2006-07-04 06:23:27
Message-ID: 1151994207.5039.18.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Last year, I questioned why CREATE TRIGGER acquires an
AccessExclusiveLock on its target table:

http://archives.postgresql.org/pgsql-hackers/2005-03/msg00764.php

Acquiring an ExclusiveLock should be sufficient: we can safely allow
concurrent SELECTs on the table. (The -hackers thread discusses both
CREATE TRIGGER and ALTER TABLE ADD FK; the latter might require some
more consideration, so I'll tackle that later.)

This patch implements this change, and updates the documentation.

Barring any objections, I'll apply this in a day or two.

-Neil

Attachment Content-Type Size
create_trigger_locking-1.patch text/x-patch 1.8 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-07-04 13:23:01 Re: [HACKERS] PQescapeIdentifier
Previous Message Marc G. Fournier 2006-07-03 15:24:49 Re: CVS mirror, was Re: [PATCHES] ADD/DROPS INHERIT (actually INHERIT