Unable to re-run initdb after installing postgresql-8.3 on Ubuntu hardy

Bug #382770 reported by egilst
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: postgresql

I installed postgresql-8.3 with sudo apt-get install postgresql. Everything seemed to go OK. The installation process initialized a database directory (i.e run the initdb command for me), and set up a configuration file (postgresql.conf). Unfortunately, the configuration file was put in a separate directory from the database directory (/etc/postgresql/8.3/main vs. /var/lib/postgresql/8.3/main). Since initdb requires the config files to be in the database directory, and there is no way to instruct initdb to find it anywhere else, I am not able to run initdb manually.

I need to do this, because I need to change the locale settings in postgresql.conf from en_US to C.

Best regards,

   Egil

Revision history for this message
egilst (egil-storen) wrote :

I have now studied how postgresql is installed on Ubuntu, and found that there are a number of commands not documented in the official PostgreSQL documentation, among those: pg_createcluster, which is a wrapper for initdb. When I found out how to use these commands, I was able to solve my problem.

Unfortunately, there was no hint when installing the package that what I installed was in fact a modified version of PostgreSQL, and that the excellent documentation found in http://www.postgresql.org/docs/8.3/static/admin.html could not be trusted.

Thus, I will withdraw this bug report. But I think there should be a better summary documentation somewhere, stressing the fact that other commands must be used to manage the database cluster, and that reference to such documentation should appear during the installation process.

Best regards,

   Egil

Revision history for this message
Martin Pitt (pitti) wrote :

You can still use initdb, but you cannot mix initdb with pg_createcluster. You either need to stick with the upstream tools, or use the Debian/Ubuntu tools.

Please see /usr/share/doc/postgresql-8.3/README.Debian.gz for further information. Thank you for your report!

Changed in postgresql (Ubuntu):
status: New → Invalid
Revision history for this message
Martin Pitt (pitti) wrote :

Oh, btw, we don't modify PostgreSQL in that regard. We have a small patch to libpq to update the default socket path (/tmp -> /var/lib/postgresql/, for security reasons), but we don't touch behaviour of the tools; that would be pretty evil.

pg_createcluster has a --locale option as well, FYI.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.