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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-jdbc by date

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