On 2023-Oct-24, PG Bug reporting form wrote:
> marius@[local]:5434/postgres=# show default_tablespace;
> default_tablespace
> --------------------
> tblspc1
> (1 row)
>
> marius@[local]:5434/postgres=# create tablespace tblspc1 location
> '/home/marius/pgcode/tblspc1';
> CREATE TABLESPACE
> marius@[local]:5434/postgres=# create database test tablespace tblspc1;
> CREATE DATABASE
> marius@[local]:5434/postgres=# \c test
> You are now connected to database "test" as user "marius".
> marius@[local]:5434/test=# create table toto(id numeric) partition by
> list(id);
> ERROR: cannot specify default tablespace for partitioned relations
Oh, so the problem here is that *both* default_tablespace and the
database's tablespace are set, and then a partitioned table creation
fails when it doesn't specify any tablespace? That indeed sounds like a
bug. I'll have a look, thanks. I'm surprised it took so long for this
to be reported.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Someone said that it is at least an order of magnitude more work to do
production software than a prototype. I think he is wrong by at least
an order of magnitude." (Brian Kernighan)