Re: deadlocks in postgresql 7.2.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philipp Reisner <philipp(dot)reisner(at)linbit(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: deadlocks in postgresql 7.2.1
Date: 2003-07-28 13:51:29
Message-ID: 8875.1059400289@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Philipp Reisner <philipp(dot)reisner(at)linbit(dot)com> writes:

> 762 ? S 0:00 /usr/lib/postgresql/bin/postmaster
> 764 ? S 0:00 postgres: stats buffer process
> 765 ? S 0:00 postgres: stats collector process
> 24872 ? S 0:00 postgres: sd sd 10.2.2.6 idle in transaction
> 24873 ? R 68:01 postgres: sd sd 10.2.2.6 SELECT
> 24932 ? S 3:09 postgres: sd sd 10.2.2.6 idle in transaction
> 24943 ? R 3:02 postgres: sd sd 10.2.2.6 SELECT
> 25004 ? S 0:01 postgres: sd sd 10.2.1.5 idle in transaction
> 21226 ? S 0:00 postgres: sd sd 10.2.1.5 idle in transaction
> 21228 ? S 0:00 postgres: sd sd 10.2.1.5 idle in transaction
> 21229 ? S 0:00 postgres: sd sd 10.2.1.5 idle in transaction
> 21230 ? S 0:00 postgres: sd sd 10.2.1.5 idle in transaction
> 21231 ? S 0:01 postgres: sd sd 10.2.1.5 idle in transaction
> 21232 ? S 0:00 postgres: sd sd 10.2.1.5 idle in transaction
> 21227 ? S 0:01 postgres: sd sd 10.2.1.5 INSERT waiting
> 21391 pts/1 S 0:00 grep postg

I see no reason to think this is an undetected deadlock. The INSERT
is probably waiting for a lock that is held by one of your idle
transactions. You need to fix your client logic to not hold
transactions open for long periods.

(Now that you've moved up to 7.3, you could look at pg_locks to see just
which idle transaction is blocking the INSERT.)

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-07-28 13:53:22 Re: Postgresql 7.3.3 crashing on query
Previous Message Peter Eisentraut 2003-07-28 09:41:47 Re: deadlocks in postgresql 7.2.1