Re: BUG #18167: cannot create partitioned tables when default_tablespace is set - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #18167: cannot create partitioned tables when default_tablespace is set
Date
Msg-id 202310250745.x6mzvzbsk4bz@alvherre.pgsql
Whole thread Raw
In response to BUG #18167: cannot create partitioned tables when default_tablespace is set  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #18167: cannot create partitioned tables when default_tablespace is set  (tender wang <tndrwang@gmail.com>)
List pgsql-bugs
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)



pgsql-bugs by date:

Previous
From: "Boyer, Maxime (he/him | il/lui)"
Date:
Subject: RE: BUG #18168: Parallel worker failed to initialize: could not create inherited socket: error code 10106
Next
From: Amit Langote
Date:
Subject: Re: AW: AW: BUG #18147: ERROR: invalid perminfoindex 0 in RTE with relid xxxxx