From: | Dmitry Fefelov <fozzy(at)ac-sw(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>, Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Sándor Miglécz <sandor(at)cybertec(dot)at>, "Hans-Juergen Schoenig" <hs(at)cybertec(dot)at> |
Subject: | Re: Partitioning/inherited tables vs FKs |
Date: | 2010-05-11 06:16:52 |
Message-ID: | 201005111316.52819.fozzy@ac-sw.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> The referential integrity triggers contain some extra magic that isn't
> easily simulatable in userland, and that is necessary to make the
> foreign key constraints airtight. We've discussed this previously but
> I don't remember which thread it was or the details of when things
> blow up. I think it's something like this: the parent has a tuple
> that is not referenced by any child. Transaction 1 begins, deletes
> the parent tuple (checking that it has no children), and pauses.
> Transaction 2 begins, adds a child tuple that references the parent
> tuple (checking that the parent exists, which it does), and commits.
> Transaction 1 commits.
Will SELECT ... FOR SHARE not help?
Regargs,
Dmitry
From | Date | Subject | |
---|---|---|---|
Next Message | Yeb Havinga | 2010-05-11 08:00:21 | Re: no universally correct setting for fsync |
Previous Message | Fujii Masao | 2010-05-11 05:01:23 | Re: max_standby_delay considered harmful |