pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: mariusraicu@laposte.net
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18167: cannot create partitioned tables when default_tablespace is set
Date: Wed, 25 Oct 2023 09:45:44 +0200
Message-ID: <202310250745.x6mzvzbsk4bz@alvherre.pgsql> (raw)
In-Reply-To: <18167-fcc9f9f33cddf04d@postgresql.org>

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)





view thread (4+ messages)  latest in thread

Message-ID: <202310250745.x6mzvzbsk4bz@alvherre.pgsql>
Permalink:  ../202310250745.x6mzvzbsk4bz@alvherre.pgsql/
Also on:    postgresql.org/message-id/202310250745.x6mzvzbsk4bz@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, mariusraicu@laposte.net, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18167: cannot create partitioned tables when default_tablespace is set
  In-Reply-To: <202310250745.x6mzvzbsk4bz@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox