Re: [araman@india-today.com: locking problem with JDBC (suspicion)]

Поиск
Список
Период
Сортировка
От Anand Raman
Тема Re: [araman@india-today.com: locking problem with JDBC (suspicion)]
Дата
Msg-id 20010213232138.I25941@india-today.com
обсуждение исходный текст
Ответ на Re: [araman@india-today.com: locking problem with JDBC (suspicion)]  (Anand Raman <araman@india-today.com>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Trewern, Ben"
Дата:
Сообщение: Drop a user leaves permissions!
Следующее
От: "Mikhail V. Majorov"
Дата:
Сообщение: How create SQL variable sentense in plpgsql?!