Re: Mysterious locking problem

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Miguel Carvalho <miguel(at)ipatimup(dot)pt>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Mysterious locking problem
Date: 2002-05-21 14:54:29
Message-ID: 20020521074935.K11485-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> I'm having a misterious locking problem ( caused by a transaction, i think ).
> But for my understanding of transactions and lock's, this wasnt supposed
> to appen.
> I'm using Postgresq 7.1.2 on a Suse 7.x box.
>
> I notice the locking problem when there are two 2 different queries
> running, of different connections( initiated by PHP ).
> Lets say I have 3 Tables:
>
> - Table A, B, C
>
> The query that is executed by one of the connections is a select on table
> B( to get some foreign keys values ) and an insert in table A( just after
> the select ).
> The other query that the second connection execute is an insert into
> table C( to start this insert it does some selects in table B ).

Given your query things above I'm guessing you've turned on query
printing? Are the selects perhaps SELECT ... FOR UPDATE queries going for
the same rows in which case I think the second would wait on the first?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2002-05-21 15:36:34 Re: too many idle processes
Previous Message Denis Perchine 2002-05-21 14:39:06 Re: PostgreSQL 7.1 forces sequence scan when there is no reason