pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove dead code for temporary relations in partition planning
Date: Wed, 04 Jul 2018 01:48:40 +0000
Message-ID: <E1faWuO-0004Wp-4x@gemulon.postgresql.org> (raw)

Remove dead code for temporary relations in partition planning

Since recent commit 1c7c317c, temporary relations cannot be mixed with
permanent relations within the same partition tree, and the same counts
for temporary relations created by other sessions, which the planner
simply discarded.  Instead be paranoid and issue an error, as those
should be blocked at definition time, at least for now.

At the same time, a test case is added to stress what has been moved
when expand_partitioned_rtentry gets called recursively but bumps on a
partitioned relation with no partitions which should be handled the same
way as the non-inheritance case.  This code may be reworked in a close
future, and covering this code path will limit surprises.

Reported-by: David Rowley
Author: David Rowley
Reviewed-by: Amit Langote, Robert Haas, Michael Paquier
Discussion: https://postgr.es/m/CAKJS1f_HyV1txn_4XSdH5EOhBMYaCwsXyAj6bHXk9gOu4JKsbw@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5fca035903a2ad2fd143b14eccf5a58af85c189d

Modified Files
--------------
src/backend/optimizer/prep/prepunion.c | 33 ++++++++++++++++-----------------
src/test/regress/expected/select.out   | 13 +++++++++++++
src/test/regress/sql/select.sql        |  8 ++++++++
3 files changed, 37 insertions(+), 17 deletions(-)



view thread (2+ messages)

Message-ID: <E1faWuO-0004Wp-4x@gemulon.postgresql.org>
Permalink:  ../E1faWuO-0004Wp-4x@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1faWuO-0004Wp-4x@gemulon.postgresql.org

 · 

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 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-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Remove dead code for temporary relations in partition planning
  In-Reply-To: <E1faWuO-0004Wp-4x@gemulon.postgresql.org>
  References: <E1faWuO-0004Wp-4x@gemulon.postgresql.org>

* 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