X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id BCA1D9DC93B for ; Mon, 23 Jan 2006 23:36:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18498-07 for ; Mon, 23 Jan 2006 23:36:44 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp110.plus.mail.mud.yahoo.com (smtp110.plus.mail.mud.yahoo.com [68.142.206.243]) by postgresql.org (Postfix) with SMTP id 1AE849DC947 for ; Mon, 23 Jan 2006 23:36:36 -0400 (AST) Received: (qmail 832 invoked from network); 24 Jan 2006 03:36:41 -0000 Received: from unknown (HELO ?127.0.0.1?) (nmceachen@67.41.117.131 with plain) by smtp110.plus.mail.mud.yahoo.com with SMTP; 24 Jan 2006 03:36:41 -0000 Message-ID: <43D5A0B9.6000800@mceachen.us> Date: Mon, 23 Jan 2006 20:36:25 -0700 From: Nathan McEachen User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: DDL hanging when different connection is left open References: <43D59563.1040702@mceachen.us> <43D598C9.2070102@opencloud.com> In-Reply-To: <43D598C9.2070102@opencloud.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200601/109 X-Sequence-Number: 14560 Oliver Jowett wrote: > 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. > Thanks, I *thought* I had checked that, being the thorough and diligent person that I am. :) However, I am using AspectJ on this project. I just figured out that I had a faulty pointcut definition. So this was not a JDBC issue, rather a "Nathan better pay closer attention to how he defines his pointcut advice" issue. Basically some aspect advice was preventing the connection from committing, hence connection 2 was hanging. Sorry for the faulty post. For all of you AOP people: public abstract pointcut dumbNathanPosts(); Object around() : dumbNathanPosts() { // just ignore what Nathan says. Do not call proceed(); } -Nathan -- In theory, there is no difference between theory and practice. But, in practice, there is. --Jan L.A. van de Snepscheut