hi guys
Just as a after thought, will a explict commit help me out of this
situation.. U know I fear that maybe some DML statement escaped commit
however it is a very remote possibility
Thanx
Anand Raman
On Tue, Feb 13, 2001 at 09:14:49PM +0530, Anand Raman wrote:
>hi guys
>
>On Tue, Feb 13, 2001 at 10:07:57AM -0500, Tom Lane wrote:
>>"Richard Huxton" <dev@archonet.com> writes:
>>> Well, foreign keys enforce constraints so it's not unreasonable that the
>>> lock might extend to the referenced tables.
>>
>
>thanx tom
>I got this point after pondering over it for some time..
>
>
>>Precisely. The SELECT FOR UPDATE is done to ensure that the referenced
>>rows don't go away before the update of the referencing table commits.
>>
>
>>I'm guessing that Anand's not shown us all the operations involved,
>>and that when things hang up it's because there are two different
>>transactions trying to lock overlapping sets of referenced rows.
>>Hard to tell from the info we have, however.
>
>as far as the entire picture is concerned here it comes..
>
>EXHIBITS ------> EXHIBIT_DISTRIBUTIONS --- EXHIBIT_PRICES
>
>where EXHIBITS is the primary table and has a one to many relationaship
>with EXHIBIT_DISTRIBUTIONS. EXHIBIT_DISTRIBUTIONS has a one to one
>relationship with EXHIBIT_PRICES.
>
>In my web applicaiton i am first inserting the rows into EXHIBITS table
>and in the next page ask the user to insert details regarding the
>EXHIBIT_DISTRIBUTIONS. I pass the primary key from the first form to the
>second and subsequently use it for inserting rows in
>EXHIBIT_DISTRIBUTIONS.
>
>The entire process works smoothly for the first few time.. However it
>hangs when i repeat the process for more than 3 times..
>
>I fail to understand if there is a problem then it would manifest itself
>in the very first time.. HOwever why should it show upon the third
>insert..
>
>I can attach the postgres log files and the creation scripts if it helps..
>
>Thanks for any suggestion..
>
>Anand
>>
>> regards, tom lane