From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5184: default tablespace owner is not dumped |
Date: | 2009-11-13 12:29:05 |
Message-ID: | 603c8f070911130429r25c63a32k2abb6e5a5ba35085@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Nov 13, 2009 at 1:13 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Robert Haas" <robertmhaas(at)gmail(dot)com> writes:
>> The following command does not change the output of "pg_dumpall":
>> alter tablespace pg_default owner to bob;
>
> I don't think this is a bug. It's one specific aspect of a general
> principle that system objects don't get dumped. If they did, using
> pg_dump to upgrade across major versions would be somewhere between
> impossible and your worst nightmare.
>
> It might be nice if manual changes to system objects got dumped,
> but that's really an AI-complete problem --- which properties of
> the objects represent manual changes, and how can we know whether
> trying to apply those changes to a new system version will work?
Well, in this particular case, the existence of the default tablespace
seems like something that should not be dumped, but all properties
other than name and location - currently, owner and acl - seem like
they should be dumped. If we don't, then we have the odd situation
that dumping and restoring a database on THE SAME version of
PostgreSQL doesn't produce an equivalent database - you may have
permissions errors where you didn't before, or visca-versa.
I think it would be over the top to suggest that pg_dump has to cope
with modifications that can only occur through manual updates to the
system catalogs, but it seems like anything that can be done using DDL
statements should be handled. It seems a little wonky to admit ALTER
statements against internal Pg names, I agree... I suppose we could
try to define some alternate syntax.
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-11-13 15:08:05 | Re: BUG #5184: default tablespace owner is not dumped |
Previous Message | Oleg Serov | 2009-11-13 11:25:14 | Crazy query plan. |