Re: pg_migrator issues

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_migrator issues
Date: 2010-01-04 21:53:23
Message-ID: 201001042153.o04LrNj16400@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> >> >> What doesn't work if we just don't rename the tablespace at all? ?And
> >> >> can't we put some smarts into the backend to handle that thing?
> >> >
> >> > Well, when you restore the old dump's schema into the new server, the
> >> > tablespace directory path will be the same, so we had better not have
> >> > any directory there.
> >>
> >> Well that seems like something you could work around by hacking the
> >> contents of the dump...
> >
> > True, in --binary-upgrade mode, but what do we make it? ?*.new? ?What if
> > they want to have the same tablespace names after the upgrade? ?It
> > really gets ugly if we are on a mount point because the tablespaces will
> > be in different file systems, which makes --link mode impossible, and
> > might create files in a filesystem that doesn't have enough space.
>
> But can't we just call a special function first before running the
> CREATE TABLESPACE, like:
>
> pg_tablespace_dont_really_create_this_tablespace_because_we_are_in_pg_migrator()?
>
> Sorta like what you did to preserve ENUM OIDs, etc.?

Well, the problem is that we are creating something in a file system,
and the old and new contents of the tablespace directories must exist
after the migration (in case the migration is reverted). We were able
to get away with this for enum because we were only creating this in the
_new_ database. With the file system, we have a resource/namespace
shared between the old and new server.

What were you thinking this function call would do?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-01-04 22:04:16 Re: pg_migrator issues
Previous Message Robert Haas 2010-01-04 21:43:06 Re: pg_migrator issues