pg_restore --create --no-tablespaces should not issue 'CREATEDATABASE ... TABLESPACE' - Mailing list pgsql-bugs

From eike
Subject pg_restore --create --no-tablespaces should not issue 'CREATEDATABASE ... TABLESPACE'
Date
Msg-id 23A7335C-B54C-43CA-AB70-BF7D0664CB4D@rikart.de
Whole thread Raw
Responses Re: pg_restore --create --no-tablespaces should not issue 'CREATEDATABASE ... TABLESPACE'  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-bugs
Hi everyone at postgres.

Talking about version 9.5/9.6 (recent updates)

I have a problem with pg_dump / pg_restore
around the tablespaces.

Running pg_restore like:

    pg_restore --clean --create --no-tablespaces 

Did fail on CREATE DATABASE (in TABLESPACE ....), 
because that statement needed the tablespace to exists upfront.

---

I'd say this is a bug in pg_restore.

When invoking pg_restore with the option --no-tablespaces
the statement: CREATE DATABASE
should create the database in the current table space,
ignoring any table space designation from the export.

















pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: BUG #14952: COPY fails to fill in IDENTITY column default value
Next
From: Devrim Gündüz
Date:
Subject: Re: BUG #14980: initddb fails (Issue with postgresql-9.3 initdconfig)