The startup scripts are fine. /etc/init.d/postgresql-8.2 exists, and it duefully will start all 8.2 instances that you created with pg_createcluster. The script you mention is from upstream; you can use and customize it if you don't want to use the Debian/Ubuntu packaging, but if you do that then you cannot complain about the Ubuntu scripts not dealing with your custom setup.
The root cause is that when you installed postgresql-8.2 the first time, the default locale did not exist and thus the package maintainer script could not create the initial default instance for 8.2 (called 'main', configuration in /etc/postgresql/8.2/main/).
So you have two options:
* Ignore the Ubuntu packacking and continue using your custom configuration (but then you loose all the tools like pg_upgradecluster for automatic upgrading).
* Dump your custom database, and revert to the distribution scripts, to retain distro support and tools. To do that I would recommend the following steps:
- pg_dumpall your current db
- Purge postgresql-8.2 (removal is NOT sufficient): sudo apt-get remove --purge postgresql-8.2
- Remove all scripts you installed manually, like /etc/init.d/postgresql, the data directory, etc.
- sudo apt-get install postgresql-8.2
- sudo -u postgres -i # to get a shell as the PostgreSQL superuser
- feed back your dump: psql template1 -f dump.sql
The startup scripts are fine. /etc/init. d/postgresql- 8.2 exists, and it duefully will start all 8.2 instances that you created with pg_createcluster. The script you mention is from upstream; you can use and customize it if you don't want to use the Debian/Ubuntu packaging, but if you do that then you cannot complain about the Ubuntu scripts not dealing with your custom setup.
The root cause is that when you installed postgresql-8.2 the first time, the default locale did not exist and thus the package maintainer script could not create the initial default instance for 8.2 (called 'main', configuration in /etc/postgresql /8.2/main/ ).
So you have two options:
* Ignore the Ubuntu packacking and continue using your custom configuration (but then you loose all the tools like pg_upgradecluster for automatic upgrading).
* Dump your custom database, and revert to the distribution scripts, to retain distro support and tools. To do that I would recommend the following steps:
- pg_dumpall your current db d/postgresql, the data directory, etc.
- Purge postgresql-8.2 (removal is NOT sufficient): sudo apt-get remove --purge postgresql-8.2
- Remove all scripts you installed manually, like /etc/init.
- sudo apt-get install postgresql-8.2
- sudo -u postgres -i # to get a shell as the PostgreSQL superuser
- feed back your dump: psql template1 -f dump.sql