pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #14315: pg_dump --no-tablespaces doesn't do it's job when --create specified 2+ messages / 2 participants [nested] [flat]
* BUG #14315: pg_dump --no-tablespaces doesn't do it's job when --create specified @ 2016-09-08 08:19 abcz2.uprola@gmail.com 0 siblings, 1 reply; 2+ messages in thread From: abcz2.uprola@gmail.com @ 2016-09-08 08:19 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged on the website: Bug reference: 14315 Logged by: Danylo Hlynskyi Email address: abcz2.uprola@gmail.com PostgreSQL version: 9.5.4 Operating system: Amazon Linux Description: I have a database in custom tablespace and I want to pg_dump/pg_restore it in another place without tablespace. But I noticed that --no-tablespaces doesn't change --create option to not include tablespaces: $ pg_dump -C --schema-only -U postgres -h test --no-tablespaces -d wp_analytics | grep "CREATE DATABASE" CREATE DATABASE wp_analytics WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' TABLESPACE = wp_tblspc; I think that it is a bug. If I specify --create and --no-tablespaces together than "TABLESPACE = wp_tblspc" should be absent in resulting command. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #14315: pg_dump --no-tablespaces doesn't do it's job when --create specified @ 2016-09-08 14:05 Tom Lane <tgl@sss.pgh.pa.us> parent: abcz2.uprola@gmail.com 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-09-08 14:05 UTC (permalink / raw) To: abcz2.uprola@gmail.com; +Cc: pgsql-bugs abcz2.uprola@gmail.com writes: > But I noticed that --no-tablespaces doesn't change --create option to not > include tablespaces: > $ pg_dump -C --schema-only -U postgres -h test --no-tablespaces -d > wp_analytics | grep "CREATE DATABASE" > CREATE DATABASE wp_analytics WITH TEMPLATE = template0 ENCODING = 'UTF8' > LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' TABLESPACE = > wp_tblspc; > I think that it is a bug. Yeah, I think you're right, especially since the corresponding code in pg_dumpall does suppress the TABLESPACE clause with --no-tablespaces. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-09-08 14:05 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-09-08 08:19 BUG #14315: pg_dump --no-tablespaces doesn't do it's job when --create specified abcz2.uprola@gmail.com 2016-09-08 14:05 ` Tom Lane <tgl@sss.pgh.pa.us>
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