Skip site navigation (1) Skip section navigation (2)

Re: DDL hanging when different connection is left open

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Nathan McEachen <nathan(at)mceachen(dot)us>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: DDL hanging when different connection is left open
Date: 2006-01-24 03:02:33
Message-ID: 43D598C9.2070102@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Nathan McEachen wrote:

> connection1 performes query: "SELECT * FROM my_table";
> connection 2 performs DDL: "ALTER TABLE my_table ADD COLUMN my_col 
> INTEGER";
> 
> 
> connection 2 seems to hang unless connection1 is closed (i.e. 
> conneciton1.close() ).

Most likely, connection 1 has autocommit off and you have forgotten to 
commit or rollback the transaction that your SELECT opened.

-O

In response to

Responses

pgsql-jdbc by date

Next:From: Nathan McEachenDate: 2006-01-24 03:36:25
Subject: Re: DDL hanging when different connection is left open
Previous:From: Nathan McEachenDate: 2006-01-24 02:48:03
Subject: DDL hanging when different connection is left open

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group