SuSE GmbH

SuSE Support Database

Title: PostgreSQL: First steps

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

PostgreSQL: First steps

Applies to

SuSE Linux: Versions since 5.3

Symptom:

Apparently it is not so easy to start working with PostgreSQL ...

In /var/log/server.log the following error message appears :

/usr/bin/postmaster does not find the database system.  Expected to find it in t
he PGDATA directory "/var/lib/pgsql/data", but unable to open file with pathname
 "/var/lib/pgsql/data/base/template1/pg_class".

No data directory -- can't proceed.

Cause:

In order to facilitate future updates or to install pure PostgreSQL client machines, the database system PostgreSQL was split into several packages :

postgres
PostgreSQL - the database
pg_datab
Initialization database for PostgreSQL
pg_ifa
PostgreSQL-Interfaces (basis)
pg_iface
Additional PostgreSQL-Interfaces

You forgot to install the package "pg_datab" during the first installation.

Solution:

Install the package "pg_datab" and try again to start the postmaster (as user "root") :

        rcpostgres start

Now login (via su) as user "postgres" :

        su - postgres
and create a PostgreSQL user with your own user name (use your login name instead of LOGNAME) :
        createuser LOGNAME

Answer all questions. Then you can create a PostgreSQL database as regular user (LOGNAME). Login as user LOGNAME and execute the following command :

        createdb address

Connect to the database via one of the interfaces delivered with PostgreSQL : psql address or under X with pgaccess.

Further information about PostgreSQL is available at /usr/doc/packages/postgres. Especially interesting is the HTML documentation : /usr/doc/packages/postgres/html/index.html.

----------

See also:

----------

Keywords: DATABASE, POSTGRESQL, SQL

----------

Categories: Applications

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

SDB-ke_postgresql-begin, Copyright SuSE GmbH, Nuremberg, Germany - Version: 10. Aug 1998
SuSE GmbH - Last generated: 07. Oct 1999 16:48:38 by maddin with sdb_gen 1.00.0