pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #6581: pg_dumpall --no-tablespaces option still sets default tablespace
3+ messages / 3 participants
[nested] [flat]
* BUG #6581: pg_dumpall --no-tablespaces option still sets default tablespace
@ 2012-04-11 17:49 keith@omniti.com
0 siblings, 1 reply; 3+ messages in thread
From: keith@omniti.com @ 2012-04-11 17:49 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 6581
Logged by: Keith Fiske
Email address: keith@omniti.com
PostgreSQL version: 9.1.3
Operating system: Any
Description:
Using the --no-tablespaces option for pg_dumpall correctly stops tablespace
creation and each individual object from having its tablespace set. But if
the original database had its default tablespace changed, this is still
added at the beginning of the dump file:
ALTER DATABASE dbname SET default_tablespace TO 'old_db_tablespace';
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #6581: pg_dumpall --no-tablespaces option still sets default tablespace
@ 2012-04-11 18:21 Tom Lane <tgl@sss.pgh.pa.us>
parent: keith@omniti.com
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2012-04-11 18:21 UTC (permalink / raw)
To: keith@omniti.com; +Cc: pgsql-bugs
keith@omniti.com writes:
> Using the --no-tablespaces option for pg_dumpall correctly stops tablespace
> creation and each individual object from having its tablespace set. But if
> the original database had its default tablespace changed, this is still
> added at the beginning of the dump file:
> ALTER DATABASE dbname SET default_tablespace TO 'old_db_tablespace';
Well, what the --no-tablespaces option does is suppress actions that are
related to tablespaces. However, ALTER DATABASE SET options are just
dumped out by generic code (likewise for ALTER ROLE SET, function SET
options, yadda yadda). I guess we could insert a hack that looked for
tablespace-related options and didn't print them, but it seems like it
would be a wart not a feature.
Also, the purpose of the option is to let you reload the dump into an
installation that hasn't got the same (or any) tablespaces. ALTER SET
commands won't prevent that, they'll at worst result in some NOTICEs
during the reload.
In short, I'm not real sure this should be considered a bug.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #6581: pg_dumpall --no-tablespaces option still sets default tablespace
@ 2012-04-11 18:29 Keith Fiske <keith@omniti.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Keith Fiske @ 2012-04-11 18:29 UTC (permalink / raw)
To: pgsql-bugs
On Wed, Apr 11, 2012 at 2:21 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> keith@omniti.com writes:
>> Using the --no-tablespaces option for pg_dumpall correctly stops tablespace
>> creation and each individual object from having its tablespace set. But if
>> the original database had its default tablespace changed, this is still
>> added at the beginning of the dump file:
>
>> ALTER DATABASE dbname SET default_tablespace TO 'old_db_tablespace';
>
> Well, what the --no-tablespaces option does is suppress actions that are
> related to tablespaces. However, ALTER DATABASE SET options are just
> dumped out by generic code (likewise for ALTER ROLE SET, function SET
> options, yadda yadda). I guess we could insert a hack that looked for
> tablespace-related options and didn't print them, but it seems like it
> would be a wart not a feature.
>
> Also, the purpose of the option is to let you reload the dump into an
> installation that hasn't got the same (or any) tablespaces. ALTER SET
> commands won't prevent that, they'll at worst result in some NOTICEs
> during the reload.
>
> In short, I'm not real sure this should be considered a bug.
>
> regards, tom lane
Agreed it's not a serious bug and doesn't stop the restore during a
basic replay with psql. But besides the warning during restore, it
also causes warnings after the reload when you connect to the
database.
postgres=# \c dbname
WARNING: invalid value for parameter "default_tablespace": "alldata1"
DETAIL: Tablespace "alldata1" does not exist.
You are now connected to database "dbname" as user "postgres".
dbname=#
Again, easily fixed with running another ALTER after the database is
up and running. But figured I'd report it.
--
Keith Fiske
Database Administrator
OmniTI Computer Consulting, Inc.
443.325.1357 x251
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2012-04-11 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11 17:49 BUG #6581: pg_dumpall --no-tablespaces option still sets default tablespace keith@omniti.com
2012-04-11 18:21 ` Tom Lane <tgl@sss.pgh.pa.us>
2012-04-11 18:29 ` Keith Fiske <keith@omniti.com>
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