Re: Reducing lock strength of adding foreign keys

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reducing lock strength of adding foreign keys
Date: 2014-10-23 07:25:05
Message-ID: 5448AD51.6090102@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/22/2014 04:13 PM, Tom Lane wrote:
> Andreas Karlsson <andreas(at)proxel(dot)se> writes:
>> I have attached a proof of concept
>> patch which reduces the lock strength to ShareLock.
>
> You're kidding, right? ShareLock isn't even self-exclusive.

Why would it have to be self-exclusive? As far as I know we only need to
ensure that nobody changes the rows while we add the trigger. Adding
multiple triggers concurrently should not pose a problem unless I am
missing something (which I probably am).

Andreas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dag-Erling Smørgrav 2014-10-23 07:30:24 Re: [PATCH] add ssl_protocols configuration option
Previous Message Martijn van Oosterhout 2014-10-23 06:30:37 Re: [PATCH] add ssl_protocols configuration option