Re: pg_migrator mention in documentation

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_migrator mention in documentation
Дата
Msg-id 200907031722.n63HMkU17372@momjian.us
обсуждение исходный текст
Ответ на Re: pg_migrator mention in documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_migrator mention in documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pg_migrator mention in documentation  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Tom Lane wrote:
> >> Also, the recommendation to specify prefix here is redundant and
> >> error-prone.  It can get the correct prefix from pg_config.
> 
> > Again, see my email just posted about using pg_migrator in a
> > multi-pg_config-binary environment.
> 
> What's your point?  If the wrong pg_config is first in the path,
> PGXS will do the wrong things anyway.  Specifying install prefix
> manually is not enough to prevent that.

I already tell them to make sure the new one is first in the path:
A third install method is to use PGXS (assuming the new 'pg_config'is the first 'pg_config' in your $PATH):

> If the pg_migrator makefiles conformed to the accepted syntax for
> PGXS invocation (click click ... which they do now) then the preferred

Good, thanks.

> solution for this would be to explicitly specify the pg_config
> location, *and nothing else*, on the make command line.
> 
>     gmake USE_PGXS=1 PG_CONFIG=/path/to/pg_config install

OK, I have updated the INSTALL file to use that and not tell them to
modify their path.

> I'm inclined to agree with Peter that the current documentation
> is just going to confuse people by giving them too many options.
> I would agree with removing the "ifdef USE_PGXS" from the makefiles
> so that the USE_PGXS=1 bit can go away, and then saying
> 
>     If the new installation's pg_config is first in your path,
>     you can just say
>         gmake install
>     Otherwise, or to be extra sure, say
>         gmake PG_CONFIG=/path/to/pg_config install
> 
> (Although actually, if that pg_config isn't in your path, the
> installed pg_migrator won't be either.  It might be better to just
> say "fix things so that the new installation's executables are
> first in your PATH", and be done with it.)

I am betting many people will do src/pg_migrator to run it.  However,
there will be no pg_migrator binary in the old cluster (hopefully) so it
would still find it even it the new cluster is not first in the path.

Here is the new text I am using:
The simplest build option is to use PGXS:        gmake USE_PGXS=1
PG_CONFIG=/usr/local/pgsql/bin/pg_configinstallAnotheroption is to point to the top of the new PostgreSQL source treeby
runningsomething like:        gmake top_builddir=/usr/src/pgsql installReplace '/usr/src/pgsql' with your new source
directory. pg_migratoralso understands the 'prefix=' specification if you installed Postgresin a custom location.
 
I am happy to remove the USE_PGXS from the Makefile, but it seems all
the other extensions require that so I want to be consistent.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.5 development schedule
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_migrator mention in documentation