From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Paragon Corporation <lr@pcorp.us>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #12869: PostGIS 2.2 can't compile against 9.5 dev branch
Date: Sun, 22 Mar 2015 11:15:26 -0400
Message-ID: <14986.1427037326@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYeW417RRrq676xe5rSoJ2Qaf_D=DO=o_sNREvBDiLDRg@mail.gmail.com>
References: <001c01d0647a$397bb260$ac731720$@pcorp.us>
<CAKFQuwZtQxTcEQRpXk4Je9=1XSUSA40=BTi62M+GNH96P6dDgg@mail.gmail.com>
<14130.1427035560@sss.pgh.pa.us>
<CAKFQuwYeW417RRrq676xe5rSoJ2Qaf_D=DO=o_sNREvBDiLDRg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> This doesn't seem like a solution...if the flattened version of an all
> constants invocation cannot be run only once where it could if it was not
> flattened I would say the we've introduced a likely (and actual)
> performance regression that punishes current valid and idiomatic code. I
> haven't gone back and devised the entire reasoning for, and potential
> benefit of, the flattening but both this and likely functions returning
> composites are being negatively affected by this change.
Well, it improves some queries and perhaps punishes others, but I should
think the overall effect would generally be a win. Even in the case given
here, it's far from clear that allowing flattening is a performance loss;
the end result would have been a query containing only constants at run
time, which in most scenarios would be a Good Thing.
As for claiming that this is broken and should be reverted: nyet. In the
first place, there is certainly no PG documentation anywhere that promises
single evaluation of a function written in the manner shown here. We do,
on the other hand, say that OFFSET 0 creates an optimization fence; so
I see nothing wrong with my recommendation. In the second place, this was
a HEAD-only change, and we certainly do not promise than the planner never
changes behavior in major version updates.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, lr@pcorp.us
Subject: Re: BUG #12869: PostGIS 2.2 can't compile against 9.5 dev branch
In-Reply-To: <14986.1427037326@sss.pgh.pa.us>
References: <001c01d0647a$397bb260$ac731720$@pcorp.us> <CAKFQuwZtQxTcEQRpXk4Je9=1XSUSA40=BTi62M+GNH96P6dDgg@mail.gmail.com> <14130.1427035560@sss.pgh.pa.us> <CAKFQuwYeW417RRrq676xe5rSoJ2Qaf_D=DO=o_sNREvBDiLDRg@mail.gmail.com> <14986.1427037326@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox