Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XQMgO-0007Jd-GP for pgsql-bugs@arkaria.postgresql.org; Sat, 06 Sep 2014 20:34:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XQMgN-00035T-Rd for pgsql-bugs@arkaria.postgresql.org; Sat, 06 Sep 2014 20:34:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XQMgM-00035L-V0 for pgsql-bugs@postgresql.org; Sat, 06 Sep 2014 20:34:03 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XQMgJ-0007s2-Bc for pgsql-bugs@postgresql.org; Sat, 06 Sep 2014 20:34:01 +0000 Received: from anarazel.de (p5DDC6352.dip0.t-ipconnect.de [93.220.99.82]) by mrelayeu.kundenserver.de (node=mreue003) with ESMTP (Nemesis) id 0MNhBG-1XS1NF1ahe-007BDr; Sat, 06 Sep 2014 22:33:51 +0200 Received: by anarazel.de (Postfix, from userid 1000) id 464B5105F03; Sat, 6 Sep 2014 22:34:10 +0200 (CEST) Date: Sat, 6 Sep 2014 22:34:10 +0200 From: Andres Freund To: Tom Lane Cc: Fujii Masao , TAKATSUKA Haruka , pgsql-bugs Subject: Re: BUG #11335: an invalid prepare statement causes crash at log_statement = 'mod' or 'ddl'. Message-ID: <20140906203410.GK26947@awork2.anarazel.de> References: <20140902111653.2936.35702@wrigleys.postgresql.org> <5731.1410035128@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5731.1410035128@sss.pgh.pa.us> X-Provags-ID: V02:K0:hdJa398Kgm1siLvghPqw8LV+xN3if/bHo2lbNomp7g7 uuisu32Gnzf9fZfH/uo49AMLd+ZLMZnW0XK5ow7SlaWhEfBx2p bJ1r8kFNQ0BJ6uxkLeFBTPe9HfJ/btPliSb2GSXBbIVlvak0sG y7rAzXaHSh0VzZ53cim6ir5v7tkxQ4NhgVTY+ONNCk7Se4MltO gP6Cmr4IEgH4et+/zorWsK9F9vQ1d1q1C/tUXM5lDCAxK4IUTQ NcFuR03wwj8PiW7iFNEg3SNKAclH4S/wUsyT6eBccyYQYyZ6Zf IF8ShMzygPxrNViF0w2tMGy7+Ji6c1PkLw2uxAztIUXU9m7Kmo o4JQUdw8TuoV1Gy1egcfRu1c+M61IKmdkVoKIkUM3 X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2014-09-06 16:25:28 -0400, Tom Lane wrote: > Fujii Masao writes: > > On Thu, Sep 4, 2014 at 3:55 AM, Fujii Masao wrote: > >> Thanks for reporting the bug! This segmentation fault could reproduce > >> even on my machine. Barring any objection, I will apply the change that > >> you suggested. > > > Done. > > I don't think this fix is either appropriate or adequate. Agreed (and commented offlist. Which probably was a mistake). > Or maybe we should reconsider whether > exec_parse_message should allow the case at all. It's not unreasonable > that Parse should require exactly one SQL statement, not just "at most > one". I think this is the best bet. There really doesn't seem much justification for the current "at most one" definition. At least not one that I could find or think of. The likelihood of leaving some places unfixed or new breakages creeping in seems non-nil; it's not what one would immediately expect. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs