Re: Lock Management: Waiting on locks - Mailing list pgsql-general

From Dev Kumkar
Subject Re: Lock Management: Waiting on locks
Date
Msg-id CALSLE1OtoqKK4i6LK3GpmF+SuKFZhaAKNhourZ5fL62jKp+Wgg@mail.gmail.com
Whole thread Raw
In response to Re: Lock Management: Waiting on locks  (Bill Moran <wmoran@potentialtech.com>)
Responses Re: Lock Management: Waiting on locks
List pgsql-general
Thanks Bill !

On Wed, Nov 26, 2014 at 9:07 AM, Bill Moran <wmoran@potentialtech.com> wrote:
In addition to what you're getting from that query, include the xact_start and
state_change columns from pg_stat_activity. My guess is that your code is
starting a transaction, then running a query, then processing the query
results before committing the transaction. Since query locks are held for
the duration of the transaction, this will cause the locks to be held for a
long time if the processing step takes a while.

Actually each of this transaction is just single INSERT or single UPDATE query.
 
If that turns out not to be the problem, then you'll probably need to provide
a bit more detail before anyone will be able to provide a better answer. I
mean, I'm even guessing that it's an app making the queries.

Can you let me know what exact details should be provided here?

Regards...

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Range type bounds
Next
From: David G Johnston
Date:
Subject: Re: Range type bounds