Re: Partitioning/inherited tables vs FKs
От | Dmitry Fefelov |
---|---|
Тема | Re: Partitioning/inherited tables vs FKs |
Дата | |
Msg-id | 201005111316.52819.fozzy@ac-sw.com обсуждение исходный текст |
Ответ на | Re: Partitioning/inherited tables vs FKs (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Partitioning/inherited tables vs FKs
|
Список | 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
В списке pgsql-hackers по дате отправления: