Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-04-17 Thread Bruce Momjian
On Wed, Apr 16, 2014 at 01:49:20PM -0400, Bruce Momjian wrote: > On Sun, Jan 12, 2014 at 11:04:41PM -0500, Bruce Momjian wrote: > > > 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

Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-04-16 Thread Bruce Momjian
On Sun, Jan 12, 2014 at 11:04:41PM -0500, Bruce Momjian wrote: > > 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

Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-01-12 Thread Adrian Klaver
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_o

Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-01-12 Thread Bruce Momjian
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. > > Start. > > /usr/local/pgsql/data/tblspc_dir > > mv ab

Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-01-12 Thread Adrian Klaver
On 01/12/2014 07:02 PM, Bruce Momjian wrote: On Sun, Jan 12, 2014 at 12:48:40PM -0500, Tom Lane wrote: Bruce Momjian writes: On Sat, Jan 11, 2014 at 12:48:51PM -0800, Adrian Klaver wrote: I see, though I have another question. If pg_tablespace and the symlinks can get out of sync, as you say

Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-01-12 Thread Bruce Momjian
On Sun, Jan 12, 2014 at 12:48:40PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > On Sat, Jan 11, 2014 at 12:48:51PM -0800, Adrian Klaver wrote: > >> I see, though I have another question. If pg_tablespace and the > >> symlinks can get out of sync, as you say below, why is pg_tablespace > >> c

Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-01-12 Thread Tom Lane
Bruce Momjian writes: > On Sat, Jan 11, 2014 at 12:48:51PM -0800, Adrian Klaver wrote: >> I see, though I have another question. If pg_tablespace and the >> symlinks can get out of sync, as you say below, why is pg_tablespace >> considered the authority? Or to put it another way, why not just >> l

Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-01-12 Thread Magnus Hagander
On Sun, Jan 12, 2014 at 5:26 AM, Bruce Momjian wrote: > On Sat, Jan 11, 2014 at 12:48:51PM -0800, Adrian Klaver wrote: > > >pg_upgrade looks in the pg_tablespace in pre-9.2, and uses a function in > > >9.2+. The query is: > > > > > > snprintf(query, sizeof(query), > > > "SELECT

Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-01-11 Thread Bruce Momjian
On Sat, Jan 11, 2014 at 12:48:51PM -0800, Adrian Klaver wrote: > >pg_upgrade looks in the pg_tablespace in pre-9.2, and uses a function in > >9.2+. The query is: > > > > snprintf(query, sizeof(query), > > "SELECT%s " > > "FROM pg_catalog.pg_tablespace " > >

Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-01-11 Thread Adrian Klaver
On 01/11/2014 10:55 AM, Bruce Momjian wrote: On Sat, Jan 11, 2014 at 10:40:20AM -0800, Adrian Klaver wrote: Right. I know there were multiple issue with this upgrade, jails probably being the biggest, but a new one I had never heard is that _if_ you are placing your tablespaces in the PGDATA di

Re: [HACKERS] [GENERAL] pg_upgrade & tablespaces

2014-01-11 Thread Bruce Momjian
On Sat, Jan 11, 2014 at 10:40:20AM -0800, Adrian Klaver wrote: > >Right. I know there were multiple issue with this upgrade, jails > >probably being the biggest, but a new one I had never heard is that _if_ > >you are placing your tablespaces in the PGDATA directory, and you are > >upgrading from