Development installation fails - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Development installation fails
Date
Msg-id Pine.LNX.4.20.9911241759440.8340-100000@localhost.localdomain
Whole thread Raw
Responses Re: [HACKERS] Development installation fails
List pgsql-hackers
For some reason I can never properly install a build from the development
sources. I have always avoided it, but now I must. I don't have the very
latest sources, but it seems I am doing something fundamentally wrong here
because all hell usually breaks loose when I try. So perhaps someone that
does this all the time can give me a few hints here.

I have a 6.5.* installation in /usr/local/pgsql (from /usr/src/pgsql).
/usr/local/pgsql is in the path, /usr/local/pgsql/lib is in ld.config.
(Linux system). The development sources I have in /home/peter/pgsql and I
want to install into /home/peter/postgres-cur. That's the setup.

~/pgsql/src$ ./configure --prefix=/home/peter/postgres-cur
works fine.

~/pgsql/src$ make
bombs out somewhere in backend/optimizer with internal compiler error (gcc
2.8.1) and/or weird make file complaints (GNU make 3.76.1). Try again with
egcs 2.91.66 works.

~/pgsql/src$ make install

~/postgres-cur/bin$ ./initdb --pglib=/home/peter/postgres-cur/lib \
--pgdata=/home/peter/postgres-cur/data

We are initializing the database system with username peter (uid=500).
This user will own all the files and must also own the server process.

Creating Postgres database system directory /home/peter/postgres-cur/data

Creating Postgres database system directory
/home/peter/postgres-cur/data/base

Creating Postgres database XLOG directory
/home/peter/postgres-cur/data/pg_xlog

Creating template database in /home/peter/postgres-cur/data/base/template1
-boot: invalid option -- x
Usage: postgres -boot [-d] [-C] [-F] [-O] [-Q] [-P portno] [dbName]    d: debug mode    C: disable version checking
F:turn off fsync    O: set BootstrapProcessing mode    P portno: specify port number
 
initdb: could not create template database

Okay, that's the first problem. So I removed that -x flag out of initdb
(look for shell variable FIRSTRUN). Next try:

~/postgres-cur/bin$ ./initdb --pglib=/home/peter/postgres-cur/lib \
--pgdata=/home/peter/postgres-cur/data

We are initializing the database system with username peter (uid=500).
This user will own all the files and must also own the server process.

Creating template database in /home/peter/postgres-cur/data/base/template1       syntax error 2370 : parse error
Creating global classes in /home/peter/postgres-cur/data/base

Adding template1 database to pg_database...

Vacuuming template1
Creating public pg_user view
Creating view pg_rules
Creating view pg_views
Creating view pg_tables
Creating view pg_indexes

Despite the error things seem to have been completed fine.

~/postgres-cur/bin$ ./postmaster -p 6543 -D /home/peter/postgres-cur/data/
Database system in directory /home/peter/postgres-cur/data/ is not
compatible with this version of Postgres, or we are unable to read the
PG_VERSION file.  Explanation from ValidatePgVersion: Version number in
file '/home/peter/postgres-cur/data//PG_VERSION' should be 7.0, not 6.5.

No data directory -- can't proceed.

Okay, so I change all the 6.5's to 7.0's by hand and try again.

~/postgres-cur/bin$ ./postmaster -p 6543 -D /home/peter/postgres-cur/data
DEBUG:  Data Base System is starting up at Wed Nov 24 17:58:40 1999
FATAL 2:  Open(cntlfile) failed: 2
FATAL 2:  Open(cntlfile) failed: 2
Startup failed - abort

At this point I thought I'd better stop messing around and ask what's
going on here.

Probably the paths of my "production" installation and the development
installation interfere with each other, but there must be a way I can do
this in a simple fashion and without affecting my running database.

Thanks,Peter

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: missing Tidscan.h
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Re: [DOCS] RE: file name error (fwd)