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:
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.
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
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.
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.
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