RE: Internal error XX000 with enable_partition_pruning=on, pg 11beta1 on Debian - Mailing list pgsql-hackers

From Phil Florent
Subject RE: Internal error XX000 with enable_partition_pruning=on, pg 11beta1 on Debian
Date
Msg-id DB7PR03MB47306F095D2E0BFA4B2D140CBA5D0@DB7PR03MB4730.eurprd03.prod.outlook.com
Whole thread Raw
In response to Re: Internal error XX000 with enable_partition_pruning=on, pg 11beta1 on Debian  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Internal error XX000 with enable_partition_pruning=on, pg 11beta1 on Debian  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers

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

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

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Internal error XX000 with enable_partition_pruning=on, pg 11beta1 on Debian
Next
From: David Rowley
Date:
Subject: Re: Internal error XX000 with enable_partition_pruning=on, pg 11beta1 on Debian