pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jason Kosowan <jasonkosowan@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: Problem upgrading PGSQL7.3.2 from PGSQL6.5 under RHLinux6.5 - missing global/pg_control
Date: Sun, 11 May 2003 01:18:21 -0700
Message-ID: <000501c31795$e3195500$0200a8c0@winjason> (raw)

Hi all

Been trying to get postmaster to run after a PGSQL upgrade from 6.5
to 7.3.2.  (I know, it's a big step!) Below is the transcription of the
steps
I've taken so far to give the complete details.  I'm installing under
/usr/local/pgsql_7.3.2
and my database data dir is on another physical drive under
/mnt/huge/postgresql.
(It's gotta be here since I don't have room on the other drive).

The short version is that everything is fine up until the postmaster phase.
It's really weird.  Firstly, when trying to start postmaser, the PG_VERSION
file did not exist (I created it later, but shouldn't the "gmake install" or
even
the "initdb" have done this already?)  Anyway, I create this file using

"echo "7.3.2" > PG_VERSION

and continue on.  Then, after I create the file, it says it can't find the
global/pg_control
file under my data directory "/mnt/huge/postgresql".  I haven't seen this
structure
before in the old installation, so I'm stumped.  (Again, shouldn't the
creation of these
directories and files be handled by "gmake install" or "initdb"?) I ran
"gmake check"
and it found no errors.  And running postmaster in higher debug mode just
gave this:

DEBUG:  proc_exit(2)
DEBUG:  shmem_exit(2)
DEBUG:  exit(2)

Anyway, below are the details.  Hope you can help since I'd really like to
get
this running soon and continue development...  :)

Take care,
Jason

<snip>

*** AS ROOT ***

- backup the data using pg_dumpall
- shut down postmaster

*many pgsql binaries and dirs scattered around in the default RH
installation,
 so rename them to ensure no versioning conflicts

- renamed /var/lib/pgsql to /var/lib/old_pgsql
- renamed /usr/data to /usr/old_data
- renamed the following old binaries in /usr/bin

-r-xr-xr-x    1 root     root         1956 Feb 12  2000
/usr/bin/old_vacuumdb
-r-xr-xr-x    1 root     root         1803 Feb 12  2000
/usr/bin/old_pg_dumpall
-r-xr-xr-x    1 root     root          251 Feb 12  2000
/usr/bin/old_ipcclean
-r-xr-xr-x    1 root     root         3743 Feb 12  2000
/usr/bin/old_initlocation
-r-xr-xr-x    1 root     root        16980 Feb 12  2000 /usr/bin/old_initdb
-r-xr-xr-x    1 root     root         4411 Feb 12  2000
/usr/bin/old_createuser
-r-xr-xr-x    1 root     root         4051 Feb 12  2000
/usr/bin/old_createlang
-r-xr-xr-x    1 root     root         2393 Feb 12  2000
/usr/bin/old_createdb
-r-xr-xr-x    1 root     root        51344 Feb 12  2000 /usr/bin/old_psql
-r-xr-xr-x    1 root     root      1115120 Feb 12  2000
/usr/bin/old_postgres
-r-xr-xr-x    1 root     root         3700 Feb 12  2000 /usr/bin/old_pg_id
-r-xr-xr-x    1 root     root         3776 Feb 12  2000
/usr/bin/old_pg_encoding
-r-xr-xr-x    1 root     root        52304 Feb 12  2000 /usr/bin/old_pg_dump
-r-xr-xr-x    1 root     root       238320 Feb 12  2000 /usr/bin/old_ecpg

- removed the following symbolic link
lrwxrwxrwx    1 root     root            8 Jan 14  2001
/usr/bin/postmaster -> postgres

******** BUILD AND INSTALLATION ************

# ./configure --prefix=/usr/local/pgsql_7.3.2 --datadir=/mnt/huge/postgresql
# gmake
# gmake install
# ls /mnt/huge/postgresql

conversion_create.sql
pg_hba.conf.sample
pg_ident.conf.sample
postgres.bki
postgres.description
postgresql.conf.sample

# chown postgres /mnt/huge/postgresql
# su - postgres
$ ./bin/initdb -D /mnt/huge/postgresql

FATAL:  data directory /mnt/huge/postgresql has group or world access;
permissions should be u=rwx (0700)

$ ### OK, give it the permissions it requires.
$ chmod 0700 /mnt/huge/postgresql
$ ./bin/initdb -D /mnt/huge/postgresql

The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.
This locale setting will prevent the use of indexes for pattern matching
operations.  If that is a concern, rerun initdb with the collation order
set to "C".  For more information see the Administrator's Guide.

initdb: The directory /mnt/huge/postgresql/ exists but is not empty.
If you want to create a new database system, either remove or empty
the directory /mnt/huge/postgresql/ or run initdb with
an argument other than /mnt/huge/postgresql/.

$ ./postmaster -D /mnt/huge/postgresql
FATAL:  File /mnt/huge/postgresql/PG_VERSION is missing. This is not a valid
data directory.

$ #### Is this normal?  Where is the PG_VERSION file?  Ok, so create it.
$ echo "7.3.2" > /mnt/huge/postgresql/PG_VERSION

$ ./postmaster -D /mnt/huge/postgresql
./postmaster does not find the database system.
Expected to find it in the PGDATA directory "/mnt/huge/postgresql",
but unable to open file "/mnt/huge/postgresql/global/pg_control": No such
file or directory

$ ### If this is needed, shouldn't have initdb created it?  :(
$ ### try the tests via gmake check
$ gmake check

======================
 All 89 tests passed.
======================

gmake[2]: Leaving directory
`/usr/local/downloads/postgresql-7.3.2/src/test/regress'
gmake[1]: Leaving directory `/usr/local/downloads/postgresql-7.3.2/src/test'

$ ### tests were ok!  What's going on?  try debug info...
$ cd /usr/local/pgsql_7.3.2/bin
$ postmaster -d 2 -D /mnt/huge/postgresql
postmaster does not find the database system.
Expected to find it in the PGDATA directory "/mnt/huge/postgresql",
but unable to open file "/mnt/huge/postgresql/global/pg_control": No such
file or directory

DEBUG:  proc_exit(2)
DEBUG:  shmem_exit(2)
DEBUG:  exit(2)

<snip>




view thread (3+ messages)  latest in thread

Message-ID: <000501c31795$e3195500$0200a8c0@winjason>
Permalink:  ../000501c31795$e3195500$0200a8c0@winjason/
Also on:    postgresql.org/message-id/000501c31795$e3195500$0200a8c0@winjason

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jasonkosowan@yahoo.com
  Subject: Re: Problem upgrading PGSQL7.3.2 from PGSQL6.5 under RHLinux6.5 - missing global/pg_control
  In-Reply-To: <000501c31795$e3195500$0200a8c0@winjason>
  References: <000501c31795$e3195500$0200a8c0@winjason>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox