Feature request #17302

Partitioned Table using PostgreSQL 10 native partitioning won't load

Added by Andreas Wicht 11 months ago. Updated 11 months ago.

Assignee:Jürgen Fischer
Category:Data Provider/PostGIS
Pull Request or Patch supplied:No Resolution:
Easy fix?:No


Given a partitioned table using the newly implemented native partitioning in PostgreSQL 10 the parent table will not load and will throw following error:

CRITICAL Layer is not valid : The layer dbname='XXX' host=XXX port=5432 user='XXX' password='XXX' sslmode=disable srid=4326 type=Polygon table="tab_part_10"."parent" (geom) sql= is not a valid layer and can not be added to the map

Child tables load without problems.

Following statements can be used to reproduce the problem.

create schema tab_part_10;

create table tab_part_10.parent (
    gid serial,
    part_key varchar(20) not null,
    geom geometry(polygon, 4326) not null
) partition by list (part_key);

create table tab_part_10.child_1 partition of tab_part_10.parent for values in ('AA');
create table tab_part_10.child_2 partition of tab_part_10.parent for values in ('BB');
create table tab_part_10.child_3 partition of tab_part_10.parent for values in ('CC');

insert into tab_part_10.child_1 (part_key, geom) values ('AA', st_geomfromtext('SRID=4326;POLYGON((1.4 55.5,1.4 54.6,2.2 54.5,2.2 55.5,1.4 55.5))'));
insert into tab_part_10.child_2 (part_key, geom) values ('BB', st_geomfromtext('SRID=4326;POLYGON((2.7 55.5,2.7 54.3,3.4 54.6,3.3 55.4,2.7 55.5))'));
insert into tab_part_10.child_3 (part_key, geom) values ('CC', st_geomfromtext('SRID=4326;POLYGON((1.9 54.3,2 53.5,3.1 53.3,2.6 54.1,1.9 54.3))'));

This problem appears both in master and 2.18.13!

Associated revisions

Revision f243b844
Added by Jürgen Fischer 11 months ago

postgres: add support for partitioned tables (implements #17302)


#1 Updated by Jürgen Fischer 11 months ago

  • Tracker changed from Bug report to Feature request

#2 Updated by Jürgen Fischer 11 months ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF