Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id E90A71337BD6 for ; Wed, 2 Mar 2011 20:14:12 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 52437-05 for ; Thu, 3 Mar 2011 00:14:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11]) by mail.postgresql.org (Postfix) with ESMTP id D32F91337BD3 for ; Wed, 2 Mar 2011 20:14:04 -0400 (AST) Received: by mail.netbsd.org (Postfix, from userid 1270) id 11CB319CEB6; Thu, 3 Mar 2011 00:14:03 +0000 (UTC) To: tgl@sss.pgh.pa.us Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5906: assertion failure in AtCleanup_Portals In-Reply-To: Your message of "Wed, 02 Mar 2011 10:09:16 -0500" <16798.1299078556@sss.pgh.pa.us> References: <16798.1299078556@sss.pgh.pa.us> X-Mailer: Cue version 0.8 (100217-1432/takashi) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Message-Id: <20110303001403.11CB319CEB6@mail.netbsd.org> Date: Thu, 3 Mar 2011 00:14:02 +0000 (UTC) From: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201103/18 X-Sequence-Number: 29528 hi, > "YAMAMOTO Takashi" writes: >> i got the following with my application, which uses >> PQsendPrepare+PQsendQueryPrepared for nearly everything >> including ROLLBACK. > > Can't do anything about that without a test case. > > regards, tom lane here's a small test case. YAMAMOTO Takashi #include #include int main() { PGconn *conn; PGresult *res; conn = PQconnectdb(""); if (PQstatus(conn) != CONNECTION_OK) { exit(1); } res = PQprepare(conn, "r", "ROLLBACK", 0, NULL); if (PQresultStatus(res) != PGRES_COMMAND_OK) { exit(1); } PQclear(res); res = PQexec(conn, "BEGIN"); if (PQresultStatus(res) != PGRES_COMMAND_OK) { exit(1); } PQclear(res); res = PQexec(conn, "hoge"); /* a syntax error made the transaction aborted */ PQclear(res); res = PQexecPrepared(conn, "r", 0, NULL, NULL, NULL, 0); if (PQresultStatus(res) != PGRES_COMMAND_OK) { exit(1); } PQclear(res); exit(0); }