Re: Partitioning/inherited tables vs FKs - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: Partitioning/inherited tables vs FKs
Date
Msg-id 4BE95494.7080209@cs.helsinki.fi
Whole thread Raw
In response to Re: Partitioning/inherited tables vs FKs  (Nicolas Barbier <nicolas.barbier@gmail.com>)
Responses Re: Partitioning/inherited tables vs FKs
List pgsql-hackers
This is getting way off topic, but:

On 5/11/10 3:55 PM +0300, Nicolas Barbier wrote:
> T2>  SELECT i FROM a WHERE i = 1 FOR SHARE; -- Lock a with i = 1 FOR SHARE.
>   i
> ---
>   1
> (1 Zeile)
>
> T2>  SELECT a_id FROM b WHERE a_id = 1; -- Check whether it's got
> anything pointing to it.
>   a_id
> ------
> (0 Zeilen)
>
> T2>  DELETE FROM a WHERE i = 1; -- Nope, so delete a with i = 1 (this
> blocks, because T1 is still holding the lock).

Obviously you wouldn't delete anything with a SHARE lock.


Regards,
Marko Tiikkaja


pgsql-hackers by date:

Previous
From: Nicolas Barbier
Date:
Subject: Re: Partitioning/inherited tables vs FKs
Next
From: Nicolas Barbier
Date:
Subject: Re: Partitioning/inherited tables vs FKs