From: | Jon Swinth <jswinth(at)atomicpc(dot)com> |
---|---|
To: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Read Lock For Foreign Key |
Date: | 2002-08-13 19:20:17 |
Message-ID: | 200208131920.g7DJKIM02602@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks for your reply Jan. I fully understand that the difficulty is why is
has not already been done. I was simply trying to take the first step in
getting something done in a software project... getting it on the todo list.
On Tuesday 13 August 2002 12:14 pm, Jan Wieck wrote:
> Jon Swinth wrote:
> > How come having foreign keys take out a read lock on a parent row rather
> > than a write lock is not on the todo list? I had someone tell me that
> > this is difficult because the SQL standard does not include syntax for
> > read lock. Does the fact that it will be difficult mean that it isn't
> > needed?
>
> The problem is that the row has to be locked against concurrent updates
> until the end of the transaction. As of now, the only way to do that
> under PostgreSQLs MVCC is to grab a lock FOR UPDATE, which is exclusive.
>
> The fact that it is difficult does not mean it isn't needed. It is
> simply the reason why it hasn't been done yet.
>
>
> Jan
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2002-08-13 19:26:15 | Re: O'Reilly Open Source Convention Report |
Previous Message | Stephan Szabo | 2002-08-13 19:15:24 | Re: Read Lock For Foreign Key |