Bug 152017 - initialization of DB failed
initialization of DB failed
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: postgresql (Show other bugs)
4
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-24 08:28 EST by Edward Pilipczuk
Modified: 2013-07-02 23:04 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-25 02:48:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Edward Pilipczuk 2005-03-24 08:28:36 EST
Description of problem:

initdb initializes data base in /var/lib/pgsql/data
postmaster reports error when started - see content of the file:
/var/lib/pgsql/pgstartup.log
---------------
FATAL:  database files are incompatible with server
DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION 72, but
the server was compiled with PG_CONTROL_VERSION 74.
HINT:  It looks like you need to initdb.
LOG:  logger shutting down
---------------

Version-Release number of selected component (if applicable):
8.0.1-4

How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:
postmaster does not start

Expected results:
postmaster starts

Additional info:
Comment 1 Tom Lane 2005-03-24 09:35:42 EST
Did you actually run initdb, or is this data directory left over from an older
version of Postgres?  My bet is the latter.  If you don't care about the
database contents, just rm -rf /var/lib/pgsql/data and then you should be able
to start Postgres.  If you do care about the contents, you'll need to revert to
the older version of Postgres for long enough to run pg_dumpall; then remove the
database, update, and restore from the dump.
Comment 2 Edward Pilipczuk 2005-03-24 11:52:08 EST
Tom,
Have you read my description carefully?
As stated in the first statement I had initialized db first
and after that I got the error described in pgstartup.log file.

I did initialization once again. 
step 1 - removed .../data directory
step 2 - initdb -D .../data (from portgres account)
step 3 - started postmaster via /etc/init.d/postgresql (as root)

step 3 reports [FAILED] ! however postmaster process appeared now in the system
Could you check it?

regards
Edward
Comment 3 Tom Lane 2005-03-24 12:46:31 EST
In that case you'd best check your PATH for old versions of initdb. 
PG_CONTROL_VERSION 72 could only have come from a 7.4 or older initdb.
Comment 4 Edward Pilipczuk 2005-03-25 02:48:50 EST
Frankly speaking I had two concurrent data directories when postmaster started:
/var/lib/pgsql/data - new (made by initdb of 8) empty directory
/var/lib/pgsql/data.old - directory from previous PG version 7.4
It looks like postmaster takes wrong data even the option -D pointed out to the
right one.
When removing old directory and reinitalizing .../data I forced postmaster to
work. However I get "FAILED" message from /etc/init.d/postgresql startup script.
Comment 5 Edward Pilipczuk 2005-03-25 03:58:39 EST
The FAILED is due to longer startup than expected.
Line 192 of startup script waits 2 seconds for postmaster to start.
My processor is 1.6GHz Pentium (notebook Dell Latitute 600).
The success is reported when increasing here this value to 5 seconds.

Thanks and happy Easter,
Edward

Note You need to log in before you can comment on or make changes to this bug.