Re: [GENERAL] autovacuum and locks

2007-10-29 Thread Dietmar Maurer
> > > > Why cant postgres get the RowExclusiveLock in transaction 3369000? > > Probably because the ExclusiveLock'ers are waiting in front > of RowExclusiveLock. Locks are granted in order. > > It would help if you didn't mangle the pg_locks output so badly. Yes, sorry about that. I was abl

Re: [GENERAL] autovacuum and locks

2007-10-29 Thread Dietmar Maurer
> > Anyways, i am trying to avoid locks now, by using my own merge > > function to avoid update/insert race condition. > > > > Or what is the suggested way to avoid the update/insert > race condition?. > > What update/insert race condition? Maybe you are talking > about the subject of example

Re: [GENERAL] autovacuum and locks

2007-10-23 Thread Alvaro Herrera
Dietmar Maurer wrote: > > > Anyways, i am trying to avoid locks now, by using my own merge > > > function to avoid update/insert race condition. > > > > > > Or what is the suggested way to avoid the update/insert > > race condition?. > > > > What update/insert race condition? Maybe you are tal

Re: [GENERAL] autovacuum and locks

2007-10-23 Thread Alvaro Herrera
Dietmar Maurer wrote: > > > > > > Why cant postgres get the RowExclusiveLock in transaction 3369000? > > > > Probably because the ExclusiveLock'ers are waiting in front > > of RowExclusiveLock. Locks are granted in order. > > > > It would help if you didn't mangle the pg_locks output so badly

Re: [GENERAL] autovacuum and locks

2007-10-23 Thread Alvaro Herrera
Dietmar Maurer wrote: > The pg_locks table shows the following: > > > SELECT pg_class.relname AS table, transaction, pid, mode, granted FROM > pg_locks, pg_class, pg_database WHERE pg_locks.relation = pg_class.oid > AND pg_locks.database = pg_database.oid; > > pg_class33

[GENERAL] autovacuum and locks

2007-10-18 Thread Dietmar Maurer
Hi all, recently our application was locked, and postgres shows several processes in "LOCK TABLE waiting" state. Even the autovacuum process is stalled. The pg_locks table shows the following: > SELECT pg_class.relname AS table, transaction, pid, mode, granted FROM pg_locks, pg_class, pg_databas