Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UmbhF-0001wv-WB for pgsql-general@arkaria.postgresql.org; Wed, 12 Jun 2013 03:26:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UmbhF-0004RB-6E for pgsql-general@arkaria.postgresql.org; Wed, 12 Jun 2013 03:26:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UmbhE-0004R5-0B for pgsql-general@postgresql.org; Wed, 12 Jun 2013 03:26:04 +0000 Received: from sd.tpf.co.jp ([210.161.239.34]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Umbh9-0004W8-HK for pgsql-general@postgresql.org; Wed, 12 Jun 2013 03:26:03 +0000 Received: (qmail 25407 invoked by uid 512); 12 Jun 2013 03:25:54 -0000 Received: from unknown (HELO ?127.0.0.1?) (100.126.1.62) by sd2.tpf-fw-c.co.jp with SMTP; 12 Jun 2013 03:25:54 -0000 Message-ID: <51B7EA41.3040706@tpf.co.jp> Date: Wed, 12 Jun 2013 12:25:53 +0900 From: "Inoue, Hiroshi" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Tom Lane CC: Joshua Berry , Andres Freund , PostgreSQL - General , Heikki Linnakangas Subject: Re: Segmentation fault with core dump References: <20130410214929.GA7547@awork2.anarazel.de> <20130410222233.GB7547@awork2.anarazel.de> <12385.1365633318@sss.pgh.pa.us> <13081.1365635172@sss.pgh.pa.us> <20130412111231.GC5766@alap2.anarazel.de> <51B73A00.1030206@tpf.co.jp> <22800.1370963033@sss.pgh.pa.us> In-Reply-To: <22800.1370963033@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org (2013/06/12 0:03), Tom Lane wrote: > Hiroshi Inoue writes: >> It's also better to fix the crash at backend side. > > Yeah, definitely. Do we have a self-contained test case for this? Unfortunately no. I'm testing with a modified psqlodbc driver. The simplest way may be as follows. 1. Implement an API function like PQexecPortal(portal name, count) which sends only an execute message. 2. Call the APIs as follows. // Connect to a database. conn = PQxxxx(....); // // Not begin a transaction for simplicity. // // The following operation defines a holdable portal whose // portal name = cursor_name. PQexec(conn, "declare cursor_name cursor with hold for select ...."); // At this point the holdable cursor becomes a held portal whose // resowner is reset to NULL. The following function call would // crash the backend. PQexecPortal(conn, cursor_name, 1); -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general