postgres does not start after upgrade to 11.2


I had postgresql 8.3 running on opensuse 11.0, recently upgraded to 11.2 (so postgres is now 8.4) and have problems starting it.

I make, su, then as root run:

/etc/init.d/postgresql start

Your databases are still using the format of PostgreSQL 8.3.
Therefore a backup of the old PostgreSQL server program will be used
until you have saved and removed your old database files
See also /usr/share/doc/packages/postgresql/README.SuSE.{de,en} .
Starting PostgreSQLsu: incorrect password

I also can’t make su to postgres user even from root:

su - postgres

su: incorrect password

su postgres

su: incorrect password

I run both above su commands as root and they both do not ask any passwords for input - just error message “incorrect password”.

This all worked on 11.0

Do you have old databases in /var/lib/pgsql/data and subdirectories ?
If so, you can try to rename this directory and start postgresql with :
service postgresql start
It should initialize ist database. I cannot help on how to import your other databases though.

thank’s for your responce

I have done as you said:

mv /var/lib/pgsql/data/ /var/lib/pgsql/data-old

service postgresql start

Initializing the PostgreSQL database at location /var/lib/pgsql/datasu: incorrect password
You can find a log of the initialisation in ~postgres/initlog .

Database reinitialized ok, but service still did not start with same issue with password. The contents of logfile:

cat ~postgres/initlog

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.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to “english”.

fixing permissions on existing directory /var/lib/pgsql/data … ok
creating subdirectories … ok
selecting default max_connections … 100
selecting default shared_buffers/max_fsm_pages … 32MB/204800
creating configuration files … ok
creating template1 database in /var/lib/pgsql/data/base/1 … ok
initializing pg_authid … ok
initializing dependencies … ok
creating system views … ok
loading system objects’ descriptions … ok
creating conversions … ok
creating dictionaries … ok
setting privileges on built-in objects … ok
creating information schema … ok
vacuuming database template1 … ok
copying template1 to template0 … ok
copying template1 to postgres … ok

Success. You can now start the database server using:

/usr/bin/postgres -D /var/lib/pgsql/data

/usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start

I still have problems with postgres system user, so I can’t start the server from the name of this user. I have changed its password to something simple as “1234” and removed “disable login” checkbox in yast user manager module - when I do “su postgres” or “su - postgres” as root I receive same “incorrect password” message - see above. When I do “su postgres” as simple user, I receive password prompt, but new “1234” does not work, and I also can’t login as postgres user at virtual console on alt+f1.

Sorry for missinfo - I have just solved the problem - I wrote the last paragraph without pressing “ok” button in yast user manager module (did press ok only in user details window), so new password was not written to system.

So, with changed password now I am able to login as postgres user and also able to start the server.

Still wondering what was the issue with old postgres user settings - what could be the reason why I could not make “su - postgres” even as root… still the main issue is solved now, thanks

>Still wondering what was the issue with old postgres user settings - what could be the reason why I could not make “su - postgres” even as root… still the main issue is solved now, thanks

With few more experiments now I see that this “disable login” checkbox in postgres user properties did cause the problem - I have returned it back and received back all the described problems, removed again and all works again.

I think this checkbox was set in 11.0 for some security reason and did work in 11.0+postgres8.3, now it does not work in 11.2+postgres8.4, so this might be a bug, or probably a new security policy