Re: Partitioning/inherited tables vs FKs

Поиск
Список
Период
Сортировка
Искать
От
Robert Haas
Тема
Re: Partitioning/inherited tables vs FKs
Дата
в 08:29:55
Msg-id
AANLkTinkbEikDBhP28QryQp_rHgtbJ3rPIT82DemcxpE@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Partitioning/inherited tables vs FKs Boszormenyi Zoltan <zb@cybertec.at>
Re: Partitioning/inherited tables vs FKs Florian Pflug <fgp@phlo.org>
Re: Partitioning/inherited tables vs FKs Tom Lane <tgl@sss.pgh.pa.us>
Re: Partitioning/inherited tables vs FKs Florian Pflug <fgp@phlo.org>
Re: Partitioning/inherited tables vs FKs Tom Lane <tgl@sss.pgh.pa.us>
Re: Partitioning/inherited tables vs FKs Greg Stark <gsstark@mit.edu>
Re: Partitioning/inherited tables vs FKs Jim Nasby <decibel@decibel.org>
Re: Partitioning/inherited tables vs FKs Jaime Casanova <jaime@2ndquadrant.com>
Re: Partitioning/inherited tables vs FKs Robert Haas <robertmhaas@gmail.com>
Re: Partitioning/inherited tables vs FKs Dmitry Fefelov <fozzy@ac-sw.com>
Re: Partitioning/inherited tables vs FKs Robert Haas <robertmhaas@gmail.com>
Re: Partitioning/inherited tables vs FKs Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Re: Partitioning/inherited tables vs FKs Nicolas Barbier <nicolas.barbier@gmail.com>
Re: Partitioning/inherited tables vs FKs "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Partitioning/inherited tables vs FKs Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Re: Partitioning/inherited tables vs FKs Nicolas Barbier <nicolas.barbier@gmail.com>
Re: Partitioning/inherited tables vs FKs Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Re: Partitioning/inherited tables vs FKs Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Re: Partitioning/inherited tables vs FKs Tom Lane <tgl@sss.pgh.pa.us>
SHARE locks vs. DELETE in SERIALIZABLE mode (Was: Partitioning/inherited tables vs FKs) Florian Pflug <fgp@phlo.org>
Re: SHARE locks vs. DELETE in SERIALIZABLE mode (Was: Partitioning/inherited tables vs FKs) "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: SHARE locks vs. DELETE in SERIALIZABLE mode (Was: Partitioning/inherited tables vs FKs) Robert Haas <robertmhaas@gmail.com>
Re: SHARE locks vs. DELETE in SERIALIZABLE mode (Was: Partitioning/inherited tables vs FKs) Florian Pflug <fgp@phlo.org>
Re: SHARE locks vs. DELETE in SERIALIZABLE mode (Was: Partitioning/inherited tables vs FKs) Jan Wieck <JanWieck@Yahoo.com>
Re: SHARE locks vs. DELETE in SERIALIZABLE mode (Was: Partitioning/inherited tables vs FKs) Florian Pflug <fgp@phlo.org>
On Tue, May 11, 2010 at 2:16 AM, Dmitry Fefelov  wrote:
>> 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?

Try it, with the example above.  I think you'll find that it doesn't.

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

В списке pgsql-hackers по дате отправления
От: Mike Fowler
Дата:
От: Marko Tiikkaja
Дата:
FAQ