pg_restore --create --no-tablespaces should not issue 'CREATE DATABASE ... TABLESPACE'

From: eike <eike(at)rikart(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_restore --create --no-tablespaces should not issue 'CREATE DATABASE ... TABLESPACE'
Date: 2017-12-15 21:26:56
Message-ID: 23A7335C-B54C-43CA-AB70-BF7D0664CB4D@rikart.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Devrim Gündüz 2017-12-15 22:24:41 Re: BUG #14980: initddb fails (Issue with postgresql-9.3 initd config)
Previous Message Peter Eisentraut 2017-12-15 17:37:20 Re: BUG #14952: COPY fails to fill in IDENTITY column default value