Re: [GENERAL] simple update query stuck

2014-04-02 Thread Si Chen
Ok, thanks. I'll keep that in mind. On Tue, Apr 1, 2014 at 7:45 PM, Andrew Sullivan wrote: > On Tue, Apr 01, 2014 at 07:00:16PM -0400, Tom Lane wrote: > > > one of the clients, in a way that isn't visible to the deadlock detector. > > One way for that to happen without any external interconnec

Re: [GENERAL] simple update query stuck

2014-04-01 Thread Andrew Sullivan
On Tue, Apr 01, 2014 at 07:00:16PM -0400, Tom Lane wrote: > one of the clients, in a way that isn't visible to the deadlock detector. > One way for that to happen without any external interconnections is if the > client is waiting for a NOTIFY that will never arrive because the would-be > sender i

Re: [GENERAL] simple update query stuck

2014-04-01 Thread Tom Lane
Andrew Sullivan writes: > Probably you could have killed one of the queries. But it sounds like > what's happening is that you have multiple queries that are all trying > to update the same rows in a different order. It may be that none of > these is strictly deadlocked, in that no query is wait

Re: [GENERAL] simple update query stuck

2014-04-01 Thread David Johnston
Andrew Sullivan-8 wrote > On Tue, Apr 01, 2014 at 01:37:17PM -0700, Si Chen wrote: >> You are right. That was the problem. I tried the query from >> http://wiki.postgresql.org/wiki/Lock_Monitoring and found a COMMIT >> transaction that was blocking it. >> >> I restarted postgresql again, and (it

Re: [GENERAL] simple update query stuck

2014-04-01 Thread Andrew Sullivan
On Tue, Apr 01, 2014 at 01:37:17PM -0700, Si Chen wrote: > You are right. That was the problem. I tried the query from > http://wiki.postgresql.org/wiki/Lock_Monitoring and found a COMMIT > transaction that was blocking it. > > I restarted postgresql again, and (it seems) everything went back to

Re: [GENERAL] simple update query stuck

2014-04-01 Thread Si Chen
, Apr 1, 2014 at 1:10 PM, Igor Neyman wrote: > > > From: pgsql-general-ow...@postgresql.org [mailto: > pgsql-general-ow...@postgresql.org] On Behalf Of Si Chen > Sent: Tuesday, April 01, 2014 3:51 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] simple update

Re: [GENERAL] simple update query stuck

2014-04-01 Thread Si Chen
hey both be trying to update the same row, resulting in a deadlock? > > > > *From:* pgsql-general-ow...@postgresql.org [mailto: > pgsql-general-ow...@postgresql.org] *On Behalf Of *Si Chen > *Sent:* Tuesday, April 01, 2014 3:51 PM > *To:* pgsql-general@postgresql.org > *Sub

Re: [GENERAL] simple update query stuck

2014-04-01 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Si Chen Sent: Tuesday, April 01, 2014 3:51 PM To: pgsql-general@postgresql.org Subject: [GENERAL] simple update query stuck Hello, I'm using postgresql 9.0.13, and I have a simple query

Re: [GENERAL] simple update query stuck

2014-04-01 Thread Paul Jungwirth
Do these queries update more than one row? I ran into a similar issue a year ago, where two multi-row updates would deadlock because they processed rows in a different order. I'd love to see UPDATE support ORDER BY to fix this, but it doesn't yet. (If I ever try contributing to Postgres, this is a

[GENERAL] simple update query stuck

2014-04-01 Thread Si Chen
Hello, I'm using postgresql 9.0.13, and I have a simple query that seems to be stuck. I did a postgres=# select procpid, query_start, waiting, current_query from pg_stat_activity; procpid | query_start | waiting | current_query 32605 | 2014-04-01 12:39: