Skip site navigation (1) Skip section navigation (2)

Re: Insert Statements Hanging

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Insert Statements Hanging
Date: 2007-07-25 20:55:13
Message-ID: 200707251355.13174@hal.medialogik.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Wednesday 25 July 2007 13:27, Pallav Kalva <pkalva(at)livedatagroup(dot)com> 
wrote:
> I am hoping "SELECT 1 FROM ONLY "provisioning"."account" x WHERE
> "accountid" = $1 FOR UPDATE OF x" is causing the problem. If that is the
> case why doesnt it show in the pg_stat_activity view ? or am I missing
> something here ? what would be the reason for insert statement to hang
> like that ?

It's waiting for a lock, probably on one of the tables that it references 
for foreign keys.

8.1 or later would have that happen a lot less; they altered the locking 
requirements for foreign key lookups.

-- 
"It is a besetting vice of democracies to substitute public opinion for
law." - James Fenimore Cooper 


In response to

pgsql-performance by date

Next:From: Karl DenningerDate: 2007-07-25 21:01:28
Subject: Re: Performance issue with 8.2.3 - "C" application
Previous:From: Bill MoranDate: 2007-07-25 20:28:34
Subject: Re: Simple select hangs while CPU close to 100%

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group