Bug 152017 - initialization of DB failed
Summary: initialization of DB failed
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: postgresql   
(Show other bugs)
Version: 4
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom Lane
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-24 13:28 UTC by Edward Pilipczuk
Modified: 2013-07-03 03:04 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Edward Pilipczuk 2005-03-24 13:28:36 UTC
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 14:35:42 UTC
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 16:52:08 UTC
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 17:46:31 UTC
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 07:48:50 UTC
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 08:58:39 UTC
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.