Re: [GENERAL] finding the other statement causing a sharelock

2010-11-09 Thread Dimitri Fontaine
Ivan Sergio Borgonovo m...@webthatworks.it writes: I've some strong suspect... and I'd like to exit earlier from a function if a process is running but I'm not really sure how to add a semaphore... Maybe pg_try_advisory_lock() would help you there?

[GENERAL] finding the other statement causing a sharelock

2010-11-08 Thread Ivan Sergio Borgonovo
I get DETAIL: Process 24749 waits for ShareLock on transaction 113443492; blocked by process 25199. Process 25199 waits for ShareLock on transaction 113442820; blocked by process 24749. I would like to know both statements that caused the sharelock problem. This is a long running transaction.

Re: [GENERAL] finding the other statement causing a sharelock

2010-11-08 Thread Tom Lane
Ivan Sergio Borgonovo m...@webthatworks.it writes: I get DETAIL: Process 24749 waits for ShareLock on transaction 113443492; blocked by process 25199. Process 25199 waits for ShareLock on transaction 113442820; blocked by process 24749. I would like to know both statements that caused the

Re: [GENERAL] finding the other statement causing a sharelock

2010-11-08 Thread Ivan Sergio Borgonovo
On Mon, 08 Nov 2010 15:45:12 -0500 Tom Lane t...@sss.pgh.pa.us wrote: Ivan Sergio Borgonovo m...@webthatworks.it writes: I get DETAIL: Process 24749 waits for ShareLock on transaction 113443492; blocked by process 25199. Process 25199 waits for ShareLock on transaction 113442820;

Re: [GENERAL] finding the other statement causing a sharelock

2010-11-08 Thread Scott Marlowe
On Mon, Nov 8, 2010 at 2:18 PM, Ivan Sergio Borgonovo m...@webthatworks.it wrote: On Mon, 08 Nov 2010 15:45:12 -0500 Tom Lane t...@sss.pgh.pa.us wrote: Ivan Sergio Borgonovo m...@webthatworks.it writes: I get DETAIL:  Process 24749 waits for ShareLock on transaction 113443492; blocked by

Re: [GENERAL] finding the other statement causing a sharelock

2010-11-08 Thread Ivan Sergio Borgonovo
On Mon, 8 Nov 2010 14:22:16 -0700 Scott Marlowe scott.marl...@gmail.com wrote: Don't know how much it helps here, but this page: http://wiki.postgresql.org/wiki/Lock_Monitoring is priceless when you're having issues midday with a lock that won't go away. I was thinking to reinvent the wheel