some questions about SELECT FOR UPDATE/SHARE

Started by Tao Maalmost 17 years ago3 messages
#1Tao Ma
feng_eden@163.com

Hi,
I noticed Tom Lane made SELECT FOR UPDATE/SHARE work on inheritance trees.
But todo list is not updated to reflect this change.
http://wiki.postgresql.org/wiki/Todo#Inheritance

Actually, there is a patch trying to remove the ONLY clause on the foreign
key checks on the inheritance tables. Matt Newell, the author of the patch,
remove too many things(both ONLY and FOR SHARE) to achieve his aims. At that
time, SELECT FOR UPDATE/SHARE cannot work on inheritance tables. Without FOR
UPDATE/SHARE, there will be some bugs, if there are concurrent updates(Tom
Lane said).

the discussions about the Matt Newell's path are here:
http://archives.postgresql.org/pgsql-patches/2005-11/msg00062.php

My question is: Is it possible to remove the ONLY from the RI checks after
Tom Lane made SELECT FOR UPDATE/SHARE work on inheritance trees?

Best wishes

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tao Ma (#1)
Re: some questions about SELECT FOR UPDATE/SHARE

"Tao Ma" <feng_eden@163.com> writes:

My question is: Is it possible to remove the ONLY from the RI checks after
Tom Lane made SELECT FOR UPDATE/SHARE work on inheritance trees?

No. The main thing standing in the way of RI on inheritance trees is
the lack of cross-tree uniqueness constraints.

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Tao Ma (#1)
Re: some questions about SELECT FOR UPDATE/SHARE

Tao Ma wrote:

Hi,
I noticed Tom Lane made SELECT FOR UPDATE/SHARE work on inheritance trees.
But todo list is not updated to reflect this change.
http://wiki.postgresql.org/wiki/Todo#Inheritance

OK, TODO updated to mark this as done.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +