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

Started by Bruce Momjianabout 22 years ago3 messagescomitters
Jump to latest
#1Bruce Momjian
bruce@momjian.us

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.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#1)
Re: pgsql-server/ /configure /configure.in rc/Make ...

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

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: pgsql-server/ /configure /configure.in rc/Make ...

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