Re: pg_partition_tree crashes for a non-defined relation

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Stephen Frost <sfrost@snowman.net>, Postgres hackers <pgsql-hackers@postgresql.org>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Date: 2019-03-04T22:41:22Z
Lists: pgsql-hackers
On Mon, Mar 04, 2019 at 03:56:00PM -0300, Alvaro Herrera wrote:
> I added tests to immortalize the current behavior for legacy inheritance
> relations too.  Thanks!

Makes sense, thanks.
--
Michael

Commits

  1. Test partition functions with legacy inheritance children, too

  2. Consider only relations part of partition trees in partition functions

  3. Make pg_partition_tree return no rows on unsupported and undefined objects

  4. Tweak pg_partition_tree for undefined relations and unsupported relkinds