Docs GODI Archive
Projects Blog Knowledge

Look up function:

(e.g. "List.find" or "keysym")
More options

Sess_postgresql_conf



Transcript: Configuring PostgreSQL

This is for a Debian 6 system.

Installing packages

As root:

# apt-get install postgresql-8.4

Changing postgresql.conf

Edit /etc/postgresql/8.4/main/postgresql.conf: Look for the line with "max_prepared_transactions". It might be commented out. Change the line to:

max_prepared_transactions = 20

The value 20 is already quite high - normally 5 should be sufficient. If you scale the namenode configuration up, however, the limit max_prepared_transactions should also be increased.

This is the only required change. Everything else is just tuning:

  • You may set synchronous_commit = off. This speeds up writes, especially when the database resides on a normal hard disk and not on an SSD. However, the namenode data is no longer safe if the computer crashes.

Changing pg_hba.conf

Edit /etc/postgresql/8.4/main/pg_hba.conf: Check whether there is a line

local all all ident

This allows password-less access via Unix domain sockets. If the line is missing, add it.

Restart the database system

/etc/init.d/postgresql restart

Create the database user

We need now to create the user account in PostgreSQL for the database accesses. This must be the Unix user which will be running the namenode.

First, become root, and then postgres:

# su - postgres
$ createuser plasma
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
$ exit

Test connectivity

Become the user you just created, and check:

$ psql template1
psql (8.4.8)
Type "help" for help.

template1=> \q

If this works without password everything is configured well.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml