[GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
Hello I have a problem that it seems to be very hard to debug. Problem is from some postgresql locks. I use PostgreSQL 9.1.8. I runned this query to fid the locks: SELECT bl.pid AS blocked_pid, a.usename AS blocked_user, kl.pid AS blocking_pid, ka.usename AS blocking_user, a.current_query AS

Re: [GENERAL] Lock problem

2014-04-02 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Victor Sterpu Sent: Wednesday, April 02, 2014 11:19 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Lock problem Hello   I have a problem that it seems to be very hard to debug. Problem

Re: [GENERAL] Lock problem

2014-04-02 Thread Tom Lane
Victor Sterpu vic...@caido.ro writes: I have a problem that it seems to be very hard to debug. Problem is from some postgresql locks. I use PostgreSQL 9.1.8. You haven't actually explained what your problem is. I runned this query to fid the locks: SELECT bl.pid AS blocked_pid, a.usename AS

Re: [GENERAL] Lock problem

2014-04-02 Thread Merlin Moncure
On Wed, Apr 2, 2014 at 10:19 AM, Victor Sterpu vic...@caido.ro wrote: Hello I have a problem that it seems to be very hard to debug. Problem is from some postgresql locks. I use PostgreSQL 9.1.8. I runned this query to fid the locks: SELECT bl.pid AS blocked_pid,

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
-- Original Message -- From: Tom Lane t...@sss.pgh.pa.us To: Victor Sterpu vic...@caido.ro Cc: pgsql-general@postgresql.org Sent: 4/2/2014 6:31:13 PM Subject: Re: [GENERAL] Lock problem Victor Sterpu vic...@caido.ro writes: I have a problem that it seems to be very hard to debug

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
-- Original Message -- From: Merlin Moncure mmonc...@gmail.com To: Victor Sterpu vic...@caido.ro Cc: PostgreSQL General pgsql-general@postgresql.org Sent: 4/2/2014 6:49:28 PM Subject: Re: [GENERAL] Lock problem On Wed, Apr 2, 2014 at 10:19 AM, Victor Sterpu vic...@caido.ro wrote

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
-- Original Message -- From: Igor Neyman iney...@perceptron.com To: Victor Sterpu vic...@caido.ro; pgsql-general@postgresql.org pgsql-general@postgresql.org Sent: 4/2/2014 6:29:17 PM Subject: RE: [GENERAL] Lock problem From: pgsql-general-ow...@postgresql.org [mailto:pgsql

Re: [GENERAL] Lock problem

2014-04-02 Thread Merlin Moncure
On Wed, Apr 2, 2014 at 11:00 AM, Victor Sterpu vic...@caido.ro wrote: All my transactions have commit or rollback. Well, you have to verify that. There's a couple of ways to do it. Probably the most direct is to: 1. Make sure database is logging pids in log_line_prefix (this is a good idea all

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
: 4/2/2014 7:08:08 PM Subject: Re: [GENERAL] Lock problem On Wed, Apr 2, 2014 at 11:00 AM, Victor Sterpu vic...@caido.ro wrote: All my transactions have commit or rollback. Well, you have to verify that. There's a couple of ways to do it. Probably the most direct is to: 1. Make sure database

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
-general@postgresql.org Sent: 4/2/2014 7:19:06 PM Subject: Re: [GENERAL] Lock problem I followed all your advice and it is obiuos that this log will show exactly what I need to debug the situation. Great tip, thank you. -- Original Message -- From: Merlin Moncure mmonc...@gmail.com

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
pgsql-general@postgresql.org Sent: 4/2/2014 9:13:22 PM Subject: Re[2]: [GENERAL] Lock problem There may pass a few days or weeks until next lock. But I don't undesrtand why the whole table is locked if there is one uncommited transaction. The following scenario might be the cause: 1. Transaction

Re: [GENERAL] Lock problem

2014-04-02 Thread Igor Neyman
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Victor Sterpu Sent: Wednesday, April 02, 2014 2:25 PM To: Victor Sterpu; Merlin Moncure Cc: PostgreSQL General Subject: Re: [GENERAL] Lock problem I'm sure

Re: [GENERAL] Lock problem

2014-04-02 Thread Alban Hertroys
On 02 Apr 2014, at 20:13, Victor Sterpu vic...@caido.ro wrote: There may pass a few days or weeks until next lock. But I don't undesrtand why the whole table is locked if there is one uncommited transaction. The following scenario might be the cause: 1. Transaction is started 2. the

Re: [GENERAL] Lock problem

2014-04-02 Thread Merlin Moncure
: PostgreSQL General Subject: Re: [GENERAL] Lock problem I'm sure is not right, but is a there a server side solution for such sitations? A configuration - timeout for idle transactions. I don't think PG has such configuration parameter. But, you could easily write a function (say

Re: [GENERAL] Lock problem

2011-09-08 Thread Eduardo Piombino
I'm sorry Tom. This happens (at least) both in 8.4 and 9.0. I've just tested it in 2 different databases with the same results. I have workarounds to this, but I was wondering what could be the actual root of the problem, in order to (try to) achieve the best solution possible. Following is a

[GENERAL] Lock problem

2011-09-07 Thread Eduardo Piombino
Hello list, I'm having a locking problem and I'm not sure what is causing it. I have two pgsql concurrent transactions, running each in a separate connection to postgres (I can reproduce it from pgadmin). T1) operates only on table A begin transaction; select id from A where id = 100 for update

Re: [GENERAL] Lock problem

2011-09-07 Thread Tom Lane
Eduardo Piombino drak...@gmail.com writes: I don't see how a new update to the same record in A, makes the difference to allow or deny the lock on a row on table B; I think it's probably explained by this: PS: The only relation between A and B is that A has a two FKs to B, but none of them

Re: [GENERAL] lock problem

2005-09-02 Thread marcelo Cortez
hi Richard ,folks Question: is normal this locks ? which is the reason of this? thanks for your time best regards MDC --- Richard Huxton dev@archonet.com escribió: marcelo Cortez wrote: Richard Sorry for a delay question the select * from pg_stat_activity

Re: [GENERAL] lock problem

2005-09-02 Thread Richard Huxton
marcelo Cortez wrote: hi Richard ,folks Question: is normal this locks ? which is the reason of this? As I said - I don't see any locks that could cause you problems. Can you provide the error message showing locks timing out? -- Richard Huxton Archonet Ltd

[GENERAL] lock problem

2005-09-01 Thread marcelo Cortez
Richard Sorry for the delay. question, the select * from pg_stat_activity thows datid|datname|procpid|usesysid|usename|current_query|query_start 52800|sume|30124|1|postgres|IDLE|2005-09-01 13:30:02.921844-03 52800|sume|30125|1|postgres|IDLE|2005-09-01 13:37:21.631802-03

Re: [GENERAL] lock problem

2005-09-01 Thread marcelo Cortez
--- Richard Huxton dev@archonet.com escribió: marcelo Cortez wrote: Hi Richard , folks the query is: SELECT c.actuacion_car AS c_actuacion, c.comentario1 || ' ' || c.comentario2 || ' ' || c.comentario3 AS c_comentario FROM caratult AS c INNER JOIN extractt AS t1 ON ...etc

[GENERAL] lock problem

2005-08-16 Thread marcelo Cortez
hi all I have a lock problem, one select query freeze my application, the query in question is on complex select , with many join's, but select all of them. The select * from pg_catalog.pg_locks show many rows while the query freeze my aplication. the aplication use ODBC . any ideas?. any help

Re: [GENERAL] lock problem

2005-08-16 Thread Richard Huxton
marcelo Cortez wrote: hi all I have a lock problem, one select query freeze my application, the query in question is on complex select An ordinary select doesn't take any locks. What is the actual query causing this? -- Richard Huxton Archonet Ltd ---(end of

Re: [GENERAL] lock problem

2005-08-16 Thread marcelo Cortez
Hi Richard , folks the query is: SELECT c.actuacion_car AS c_actuacion, c.comentario1 || ' ' || c.comentario2 || ' ' || c.comentario3 AS c_comentario FROM caratult AS c INNER JOIN extractt AS t1 ON (c.id_extracto_car = t1.id_extracto) INNER JOIN repartit AS r1 ON (c.id_reparticion_uc =

Re: [GENERAL] lock problem

2005-08-16 Thread Richard Huxton
marcelo Cortez wrote: Hi Richard , folks the query is: SELECT c.actuacion_car AS c_actuacion, c.comentario1 || ' ' || c.comentario2 || ' ' || c.comentario3 AS c_comentario FROM caratult AS c INNER JOIN extractt AS t1 ON ...etc I'm not seeing anything here that should take locks, although

[GENERAL] Lock problem on Solaris

2000-10-09 Thread Travis Bauer
When I start postmaster, I get the following: IpcSemaphoreCreate: semget failed (No space left on device) key = ... I know that this is caused by not having enough semaphores and can be fixed by increasing some settings. However, it normall works fine with the setting, and a nasty crash

Re: [GENERAL] Lock problem on Solaris

2000-10-09 Thread Tom Lane
Travis Bauer [EMAIL PROTECTED] writes: When I start postmaster, I get the following: IpcSemaphoreCreate: semget failed (No space left on device) key = ... However, it normall works fine with the setting, and a nasty crash killed it this morning. I think that for some reason, some

Re: [GENERAL] Lock problem on Solaris

2000-10-09 Thread Travis Bauer
Tom, Thanks. Running ipcclean fixed it right away. Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer On Mon, 9 Oct 2000, Tom Lane wrote: Travis