Skip site navigation (1) Skip section navigation (2)

Re: pg_upgrade - add config directory setting

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
Cc: "Mr(dot) Aaron W(dot) Swenson" <titanofold(at)gentoo(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_upgrade - add config directory setting
Date: 2011-09-29 21:07:51
Message-ID: 201109292107.p8TL7pV03813@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Steve Crawford wrote:
> On 09/29/2011 08:20 AM, Bruce Momjian wrote:
> > ...
> > 1  document the limitation and require users to use symlinks
> > 2  add a --old/new-configdir parameter to pg_upgrade
> > 3  have pg_upgrade find the real data dir by starting the server
> > 4  add a flag to some tool to return the real data dir, and backpatch
> >     that
> 5. (really 3a). Have pg_upgrade itself check the specified --XXX-datadir 
> for postgresql.conf and use the data_directory setting therein using the 
> same rules as followed by the server.
> 
> This would mean that there are no new options to pg_upgrade and that 
> pg_upgrade operation would not change when postgresql.conf is in the 
> data-directory. This would also make it consistent with PostgreSQL's 
> notion of file-locations:
> 
> "If you wish to keep the configuration files elsewhere than the data 
> directory, the postgres -D command-line option or PGDATA environment 
> variable must point to the directory containing the configuration files, 
> and the data_directory parameter must be set in postgresql.conf..."
> 
> So for backporting, it could just be considered a "bug fix" that aligns 
> pg_upgrade's interpretation of datadir to that of the server.

pg_upgrade is not about to start reading through postgresql.conf looking
for a definition for data_directory --- there are too many cases where
this could go wrong.  It would need a full postgresql.conf parser.

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

  + It's impossible for everything to be true. +

In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2011-09-29 21:08:23
Subject: Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build)
Previous:From: Kohei KaiGaiDate: 2011-09-29 20:52:57
Subject: Re: [v9.2] Object access hooks with arguments support (v1)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group