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

Re: pg_migrator mention in documentation

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_migrator mention in documentation
Date: 2009-07-02 23:28:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Peter Eisentraut wrote:
> On Friday 19 June 2009 00:56:42 Bruce Momjian wrote:
> > > The makefile for pg_migrator currently assumes by default that it is
> > > located under contrib/.  Which confuses me.
> >
> > You can compile pg_migrator by copying it to /contrib, or using PGXS;
> > both work.  Read the 15-step install instructions for details:
> >
> > 	(7)  Build pg_migrator
> >
> > 	For pg_migrator source installs, keep in mind the compile must use the
> > 	_new_ PostgreSQL source directory and be installed in the new Postgres
> > 	install directory.
> >
> > 	The simplest build option is to point to the top of the PostgreSQL
> > 	source tree by running something like:
> >
> > 	        gmake top_builddir=/usr/src/pgsql install
> >
> > 	Replace '/usr/src/pgsql' with your source directory.  pg_migrator also
> > 	understands the 'prefix=' specification if you installed Postgres in a
> > 	custom location.  Another build option is to copy the pg_migrator
> > 	directory into contrib/pg_migrator in the new PostgreSQL source tree and
> > 	run a simple 'gmake install'.  A third install method is to use PGXS
> > 	(assuming the new 'pg_config' is in your $PATH):
> >
> > 	        USE_PGXS=1 gmake prefix=/usr/local/ install
> Maybe the latter method should be the default, as it matches better with how 
> we encourage other extension modules to be built?

I looked at that and the problem is that pg_migrator must be built
against the _new_ source tree, and will issue an error and exit if it
isn't.  The problem with PGXS is it silently chooses the source tree to
use based on which pg_config it finds in its path first;  that seems
error-prone.  Any ideas for a clearer way to specify pg_config, and is
that really helping things if the user has to specify it?  As you can
see, pg_migrator has the requirement of running in a multi-pg_config
binary environment, so it has extra complexity that might make pg_config
an undesirable option to be promoted first.

  Bruce Momjian  <bruce(at)momjian(dot)us>

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

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2009-07-02 23:28:52
Subject: Re: pg_migrator mention in documentation
Previous:From: Tom LaneDate: 2009-07-02 22:04:23
Subject: Re: TODO items

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