From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Joseph Kregloh <jkregloh(at)sproutloud(dot)com>, John R Pierce <pierce(at)hogranch(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] pg_upgrade & tablespaces |
Date: | 2014-01-13 04:41:27 |
Message-ID: | 52D36E77.40001@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On 01/12/2014 08:04 PM, Bruce Momjian wrote:
> On Sun, Jan 12, 2014 at 07:58:52PM -0800, Adrian Klaver wrote:
>> Well the problem is that it actually points to a current PGDATA just
>> the wrong one. To use the source installation path and the suggested
>> upgrade method from pg_upgrade.
>>
>> In the pgsql_old installation you have symlinks pointing back to the
>> current default location. As well pg_tablespace points back to
>> /usr/local/pgsql/data/ The issue is that there is not actually
>> anything there in the way of a tablespace. So when pg_upgrade runs
>> it tries to upgrade from /usr/local/pgsql/data/tblspc_dir to
>> /usr/local/pgsql/data/tblspc_dir where the first directory either
>> does not exist. or if the user went ahead and created the directory
>> in the new installation, is empty. What is really wanted is to
>> upgrade from /usr/local/pgsql_old/data/tblspc_dir to
>> /usr/local/pgsql/data/tblspc_dir. Right now the only way that
>> happens is with user intervention.
>
> Right, it points to _nothing_ in the _new_ cluster. Perhaps the
> simplest approach would be to check all the pg_tablespace locations to
> see if they point at real directories. If not, we would have to have
> the user update pg_tablespace and the symlinks. :-( Actually, even in
> 9.2+, those symlinks are going to point at the same "nothing". That
> would support checking the symlinks in all versions.
>
Agreed.
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Felix.徐 | 2014-01-13 06:51:57 | Re: How to specify/mock the statistic data of tables in PostgreSQL |
Previous Message | Chris Travers | 2014-01-13 04:24:13 | Re: DB Authentication Design |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2014-01-13 05:06:42 | Re: plpgsql.consistent_into |
Previous Message | Alvaro Herrera | 2014-01-13 04:18:08 | Re: [PATCH] Relocation of tablespaces in pg_basebackup |