default partitions can be partitioned and have default partitions?
postgres=# CREATE TABLE t(i int)PARTITION BY RANGE(i);
CREATE TABLE
postgres=# CREATE TABLE t0 PARTITION OF t DEFAULT PARTITION BY RANGE(i);
CREATE TABLE
postgres=# CREATE TABLE t00 PARTITION OF t0 DEFAULT; -- oh yes
CREATE TABLE
...
Not sure how it could be useful to partition default into subpartitions of
lists, ranges, hashes.
Justin
On Sun, Sep 29, 2019 at 12:18 AM Justin Pryzby <pryzby@telsasoft.com> wrote:
postgres=# CREATE TABLE t(i int)PARTITION BY RANGE(i);
CREATE TABLE
postgres=# CREATE TABLE t0 PARTITION OF t DEFAULT PARTITION BY RANGE(i);
CREATE TABLE
postgres=# CREATE TABLE t00 PARTITION OF t0 DEFAULT; -- oh yes
CREATE TABLE
Actually, you can go even further
CREATE TABLE t00 PARTITION OF t0 DEFAULT PARTITION BY HASH (i);
Not sure how it could be useful to partition default into subpartitions of
lists, ranges, hashes.
Yeah, maybe the top-level partitioning should be designed such that
the default partition doesn't need sub-partitioning, but perhaps
Postgres shouldn't prevent users from trying it. This was discussed
when the default partition feature went in; see [1]/messages/by-id/CA+TgmoYh-hitRRUfxVxDVAjioYPrjhBCehePGRUa6qNNUnKvuw@mail.gmail.com.
Thanks,
Amit
[1]: /messages/by-id/CA+TgmoYh-hitRRUfxVxDVAjioYPrjhBCehePGRUa6qNNUnKvuw@mail.gmail.com