pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@2ndquadrant.com>
Cc: sthomas@optionshouse.com, Dave Johansen <davejohansen@gmail.com>
Cc: bricklen <bricklen@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Partitions not Working as Expected
Date: Thu, 27 Jun 2013 17:17:55 -0400
Message-ID: <654.1372367875@sss.pgh.pa.us> (raw)
In-Reply-To: <20130627204317.GP1254@alap2.anarazel.de>
References: <51CC652F.3010304@optionshouse.com>
<A76B25F2823E954C9E45E32FA49D70EC1BBD8EEA@mail.corp.perceptron.com>
<51CC73B6.2050406@optionshouse.com>
<CAGrpgQ_3pCLt3CJnap3z+nWe3-Q=A3sMH7OKP0sUeo79kViD8w@mail.gmail.com>
<CAAcYxUfCaYbpAv-sQaNGKEVK2UZA1BtL87jM8LBd81ZomaLUuA@mail.gmail.com>
<51CC8160.2080905@optionshouse.com>
<27533.1372358546@sss.pgh.pa.us>
<20130627204317.GP1254@alap2.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Andres Freund <andres@2ndquadrant.com> writes:
> Couldn't we at least significantly improve on the status quo by
> detecting we're currently planning a query that's only going to be
> executed once (because it's directly executed or because were planning a
> onetime plan for specific parameters) and inline stable functions before
> doing the theorem proving?
I think Haas went down that rabbit hole before you. The current
definition of stable functions is not strong enough to guarantee that a
plan-time evaluation would give the same result as a run-time
evaluation, not even in one-shot-plan cases. The obvious reason why not
is that the planner isn't using the same snapshot that the executor will
use (which is not that easy to change, see his failed patch from a year
or so back). But even if we rejiggered things enough so the query did
use the same snapshot that'd been used for planning, I'm not very
convinced that such an assumption would be valid. The assumptions for
stable functions are pretty weak really.
regards, tom lane
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
view thread (16+ messages) latest in thread
Message-ID: <654.1372367875@sss.pgh.pa.us> Permalink: ../654.1372367875@sss.pgh.pa.us/ Also on: postgresql.org/message-id/654.1372367875@sss.pgh.pa.us ·
reply
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 using the --to and --cc options: reply via email To: pgsql-performance@postgresql.org Cc: tgl@sss.pgh.pa.us, andres@2ndquadrant.com, davejohansen@gmail.com, bricklen@gmail.com Subject: Re: Partitions not Working as Expected In-Reply-To: <654.1372367875@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