This is for a Debian 6 system.
# apt-get install postgresql-8.4
/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:
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.
/etc/postgresql/8.4/main/pg_hba.conf: Check whether there is
local all all ident
This allows password-less access via Unix domain sockets. If the line is missing, add it.
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
# 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
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.