RE: Internal error XX000 with enable_partition_pruning=on, pg 11 beta1 on Debian

Phil Florent <philflorent@hotmail.com>

From: Phil Florent <philflorent@hotmail.com>
To: David Rowley <david.rowley@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-07-16T04:56:41Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Match RelOptInfos by relids not pointer equality.

  2. Fix run-time partition pruning for appends with multiple source rels.

Hi,


I should post that in the general section but I am confused by the sentence "A parent partition is always going to have a lower relid than its children"


In the code, relid has many meanings and not only "oid of a class" as in https://www.postgresql.org/message-id/20910.1111734343@sss.pgh.pa.us ?
PostgreSQL: Re: relid and relname<https://www.postgresql.org/message-id/20910.1111734343@sss.pgh.pa.us>
www.postgresql.org
Michael Fuhr <mike(at)fuhr(dot)org> writes: > On Thu, Mar 24, 2005 at 11:01:23PM -0300, Edson Vilhena de Carvalho wrote: >> Can anyone tell me what is a relid, a relname and


In fact, I want to be sure I can say to the developers they will always be able to create tables and partitions in any order :

create table child1(c1 int, c2 int);

create table midparent1(c1 int, c2 int) partition by list(c2);

alter table midparent1 attach partition child1 for values in (1);

create table child2 partition of midparent1 for values in (2);

create table topparent(c1 int, c2 int) partition by list(c1);

alter table topparent attach partition midparent1 for values in (1);

select relname, relkind, oid from pg_class where relname in ('topparent', 'midparent1', 'child1', 'child2') order by oid asc;

  relname   | relkind |  oid
------------+---------+--------
 child1     | r       | 123989
 midparent1 | p       | 123992
 child2     | r       | 123995
 topparent  | p       | 123998
(4 lignes)


Regards
Phil