Re: [COMMITTERS] pgsql: Implement table partitioning.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Implement table partitioning.
Date: 2016-12-07 18:30:48
Message-ID: CA+Tgmobc4UVf2ARTR4D=xHOTHhVtEWbLSPuZAJP6QHHBNZPYcw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Dec 7, 2016 at 1:20 PM, Robert Haas <rhaas(at)postgresql(dot)org> wrote:
> Implement table partitioning.

Well, that didn't take long to cause problems. The very first
buildfarm machine to report after this commit is longfin, which is
unhappy:

***************
*** 392,419 ****
c text,
d text
) PARTITION BY RANGE (a oid_ops, plusone(b), c collate "default", d
collate "en_US");
-- check relkind
SELECT relkind FROM pg_class WHERE relname = 'partitioned';
relkind
---------
! P
! (1 row)

-- check that range partition key columns are marked NOT NULL
SELECT attname, attnotnull FROM pg_attribute WHERE attrelid =
'partitioned'::regclass AND attnum > 0;
! attname | attnotnull
! ---------+------------
! a | t
! b | f
! c | t
! d | t
! (4 rows)
!
-- prevent a function referenced in partition key from being dropped
DROP FUNCTION plusone(int);
- ERROR: cannot drop function plusone(integer) because other objects
depend on it
- DETAIL: table partitioned depends on function plusone(integer)
- HINT: Use DROP ... CASCADE to drop the dependent objects too.
-- partitioned table cannot partiticipate in regular inheritance
CREATE TABLE partitioned2 (
a int
--- 392,411 ----
c text,
d text
) PARTITION BY RANGE (a oid_ops, plusone(b), c collate "default", d
collate "en_US");
+ ERROR: collation "en_US" for encoding "SQL_ASCII" does not exist
-- check relkind
SELECT relkind FROM pg_class WHERE relname = 'partitioned';
relkind
---------
! (0 rows)

-- check that range partition key columns are marked NOT NULL
SELECT attname, attnotnull FROM pg_attribute WHERE attrelid =
'partitioned'::regclass AND attnum > 0;
! ERROR: relation "partitioned" does not exist
! LINE 1: ...me, attnotnull FROM pg_attribute WHERE attrelid = 'partition...
! ^
-- prevent a function referenced in partition key from being dropped
DROP FUNCTION plusone(int);
-- partitioned table cannot partiticipate in regular inheritance
CREATE TABLE partitioned2 (
a int

No idea why yet, but I'll try to figure it out.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-12-07 18:33:09 Re: [COMMITTERS] pgsql: Implement table partitioning.
Previous Message Robert Haas 2016-12-07 18:20:01 pgsql: Implement table partitioning.

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-12-07 18:33:09 Re: [COMMITTERS] pgsql: Implement table partitioning.
Previous Message Robert Haas 2016-12-07 18:20:04 Re: Declarative partitioning - another take