Re: Re: Getting rid of "accept incoming network connections" prompts on OS X

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: edward745 <cedward345(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: Getting rid of "accept incoming network connections" prompts on OS X
Date: 2014-10-24 13:49:36
Message-ID: CA+Tgmoamv2dJZ820bxJWcFHA3ZqAEqgQRPjU_-GNKG86Lm+FxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 22, 2014 at 2:14 AM, edward745 <cedward345(at)gmail(dot)com> wrote:
> One of the queries in ri_triggers.c has be a little baffled.
>
> For (relatively) obvious reasons, a FK insert triggers a SELECT 1 FROM
> pk_rel ... FOR KEY SHARE.
> For not-so-obvious reasons, a PK delete triggers a SELECT 1 FROM fk_rel ...
> FOR KEY SHARE.
>
> I can't see what the lock on fk_rel achieves. Both operations are already
> contending for the lock on the PK row, which seems like enough to cover
> every eventuality.
>
> And even if the lock serves a purpose, KEY SHARE is an odd choice, since the
> referencing field is, in general, not a "key" in this sense.

Please don't post unrelated questions onto existing mailing list
threads. Start a new thread for a new topic.

Thanks,

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-10-24 13:57:30 Re: [Windows,PATCH] Use faster, higher precision timer API
Previous Message Robert Haas 2014-10-24 13:45:59 Re: Deferring some AtStart* allocations?