Thread: pgsql-server/ /configure /configure.in rc/Make ...

pgsql-server/ /configure /configure.in rc/Make ...

From
momjian@svr1.postgresql.org (Bruce Momjian)
Date:
CVSROOT:    /cvsroot
Module name:    pgsql-server
Changes by:    momjian@svr1.postgresql.org    04/05/11 18:57:15

Modified files:
    .              : configure configure.in
    src            : Makefile.global.in
    src/backend/postmaster: postmaster.c
    src/backend/tcop: postgres.c
    src/backend/utils/init: Makefile
    src/bin/initdb : Makefile initdb.c
    src/bin/pg_dump: Makefile pg_dumpall.c
    src/include    : miscadmin.h port.h
    src/port       : path.c pipe.c
Added files:
    src/port       : exec.c
Removed files:
    src/backend/utils/init: findbe.c

Log message:
    As part of the work for making relocatable installs, I have re-factored
    all the code that looks for other binaries.  I move FindExec into
    port/exec.c (and renamed it to find_my_binary()).  I also added
    find_other_binary that looks for another binary in the same directory as
    the calling program, and checks the version string.

    The only behavior change was that initdb and pg_dump would look in the
    hard-coded bindir directory if it can't find the requested binary in the
    same directory as the caller.  The new code throws an error.  The old
    behavior seemed too error prone for version mismatches.


Re: pgsql-server/ /configure /configure.in rc/Make ...

From
Tom Lane
Date:
momjian@svr1.postgresql.org (Bruce Momjian) writes:
>     As part of the work for making relocatable installs, I have re-factored
>     all the code that looks for other binaries.  I move FindExec into
>     port/exec.c (and renamed it to find_my_binary()).  I also added
>     find_other_binary that looks for another binary in the same directory as
>     the calling program, and checks the version string.

Version string?  What version string?  Binaries don't have any checkable
version info that I know of ...

            regards, tom lane

Re: pgsql-server/ /configure /configure.in rc/Make ...

From
Bruce Momjian
Date:
Tom Lane wrote:
> momjian@svr1.postgresql.org (Bruce Momjian) writes:
> >     As part of the work for making relocatable installs, I have re-factored
> >     all the code that looks for other binaries.  I move FindExec into
> >     port/exec.c (and renamed it to find_my_binary()).  I also added
> >     find_other_binary that looks for another binary in the same directory as
> >     the calling program, and checks the version string.
>
> Version string?  What version string?  Binaries don't have any checkable
> version info that I know of ...

binary -V echos a version string, and our code already was checking
that:

    $ pg_dump -V
    pg_dump (PostgreSQL) 7.5devel
    $ postgres -V
    postgres (PostgreSQL) 7.5devel

Actually, initdb was checking, but pg_dumpall was not.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073