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/ The

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 of a

Re: [HACKERS] [GENERAL] pg_upgrade tablespaces

2014-01-12 Thread Magnus Hagander
On Sun, Jan 12, 2014 at 5:26 AM, Bruce Momjian br...@momjian.us 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-12 Thread Tom Lane
Bruce Momjian br...@momjian.us 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

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 br...@momjian.us 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

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 br...@momjian.us 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

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 above to

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

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

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

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 WHERE