Re: [GENERAL] Index creation problem

2012-10-19 Thread Oliver Kohll - Mailing Lists
On 19 Oct 2012, at 15:09, "Albe Laurenz" wrote: > You should always include the list in your replies - > other people might be interested in the solution. Oops, thought I had. > > There must be at least two transactions involved > to create a locking problem like you describe. > But since CRE

Re: [GENERAL] Index creation problem

2012-10-19 Thread Albe Laurenz
Oliver Kohll wrote: >> In the example you show, some connections are "idle in transaction". >> Such connections can hold locks that block your CREATE INDEX. >> Could you look at pg_locks if there is a lock that is not granted? >> There could also be prepared transactions holding locks, if >> you us

Re: [GENERAL] Index creation problem

2012-10-19 Thread Albe Laurenz
Oliver Kohll wrote: > I'm getting a problem where my application hangs in the process of adding a field to a table. The app > adds the field, then creates an index on the field. It hangs for ages (minutes) until I cancel the > query. My investigation so far has been > > Look at current queries: >

Re: [GENERAL] Index creation problem

2012-10-19 Thread Oliver Kohll - Mailing Lists
On 19 Oct 2012, at 13:28, Frank Lanitz wrote: > Just an idea without bigger investigation: Whare are the idle in > transactions are doing? Maybe they are blocking the create index. > > Cheers, > Frank Good question, I don't know. The app runs on Java / Apache Tomcat, which maintains a connecti

[GENERAL] Index creation problem

2012-10-19 Thread Oliver Kohll - Mailing Lists
Hi, I'm getting a problem where my application hangs in the process of adding a field to a table. The app adds the field, then creates an index on the field. It hangs for ages (minutes) until I cancel the query. My investigation so far has been Look at current queries: agilebasedata=# SELECT