Wow! I seem to be stuck in the 9th level of pg wrapper command hell...
On Debian, have been trying to delete cluster 'main' (in order to recreate using appropriate locales and other options...)
After a bit of futzing, am getting these responses from wrapper tools:
$ pg_createcluster 9.4 main Error: cluster configuration already
exists
( seems reasonable - it does! )
$ pg_dropcluster 9.4 main Error: Invalid data directory
OK, but which data directory? The 'main' cluster dir is there, intact - correct permissions...
What do these tools read to get these configurations?
How to drop 'main' and start afresh?
/etc/postgresql/9.4/main/postgresql.conf
. If you have deleted that, finish the manual delete by removing the datadir.dpkg
oraptitude
and then just re-install what you need. Also tip for finding what files a command will open: prefix it withstrace -e open
. It will create a lot of lines on output but you will see each file your command opens and with related errors.