Re: BUG #11335: an invalid prepare statement causes crash at log_statement = 'mod' or 'ddl'. - Mailing list pgsql-bugs

From Andres Freund
Subject Re: BUG #11335: an invalid prepare statement causes crash at log_statement = 'mod' or 'ddl'.
Date
Msg-id 20140906203410.GK26947@awork2.anarazel.de
Whole thread Raw
In response to Re: BUG #11335: an invalid prepare statement causes crash at log_statement = 'mod' or 'ddl'.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #11335: an invalid prepare statement causes crash at log_statement = 'mod' or 'ddl'.
List pgsql-bugs
On 2014-09-06 16:25:28 -0400, Tom Lane wrote:
> Fujii Masao <masao.fujii@gmail.com> writes:
> > On Thu, Sep 4, 2014 at 3:55 AM, Fujii Masao <masao.fujii@gmail.com> 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #11335: an invalid prepare statement causes crash at log_statement = 'mod' or 'ddl'.
Next
From: Alvaro Herrera
Date:
Subject: Re: Re: BUG #10329: Could not read block 0 in file "base/56100265/57047884": read only 0 of 8192 bytes