Martin, the output of pg_lsclusters is: [EMAIL PROTECTED]:~# cat /usr/bin/pg_lsclusters #!/usr/bin/perl -wT # Show all PostgreSQL clusters in a list # # (C) 2005 Martin Pitt <[EMAIL PROTECTED]>
use lib '/usr/share/postgresql-common'; use PgCommon; use Getopt::Long; exit 1 unless GetOptions ('h|no-header' => \$no_header); @columns = ('Version', 'Cluster', 'Port', 'Status', 'Owner', 'Data directory', 'Log file'); @colwidths = qw/7 9 4 6 8 34 30/; foreach $cw (@colwidths) { $fmtstring .= '%-'.$cw.'s '; } $fmtstring .= "\n"; printf $fmtstring, @columns unless $no_header; foreach $v (sort (get_versions())) { my @clusters = get_version_clusters $v; foreach $c (sort @clusters) { %info = cluster_info $v, $c; printf $fmtstring, ($v, $c, $info{'port'}, $info{'running'} ? "online" : "down", (getpwuid $info{'owneruid'})[0], $info{'pgdata'}, $info{'logfile'}); } } __END__ =head1 NAME pg_lsclusters - show information about all PostgreSQL clusters =head1 SYNOPSIS B<pg_lsclusters> [I<options>] =head1 DESCRIPTION This command shows a list about the configuration and status of all clusters. =head1 OPTIONS =over 4 =item B<-h>, B<--no-header> Do not print the column header line. =head1 AUTHOR Martin Pitt L<E<lt>[EMAIL PROTECTED]<gt>> Now the output for sudo ls -lR /etc/postgresql /var/lib/postgresql is: [EMAIL PROTECTED]:~# ls -lR /etc/postgresql /var/lib/postgresql/ /etc/postgresql: total 4 drwxr-xr-x 3 root root 4096 2006-07-12 13:30 8.1 /etc/postgresql/8.1: total 4 drwxr-xr-x 2 root root 4096 2006-07-12 13:30 main /etc/postgresql/8.1/main: total 0 lrwxrwxrwx 1 root root 28 2006-07-12 13:30 pgdata -> /var/lib/postgresql/8.1/main /var/lib/postgresql/: total 4 drwxr-xr-x 3 postgres postgres 4096 2006-07-12 13:30 8.1 /var/lib/postgresql/8.1: total 4 drwx------ 2 postgres postgres 4096 2006-07-12 13:30 main /var/lib/postgresql/8.1/main: total 0 The output for apt-get install postgresql-common postgresql-client-common postgresql-8.1 is: [EMAIL PROTECTED]:~# apt-get install postgresql-common postgresql-client-common postgresql-8.1 Reading package lists... Done Building dependency tree... Done postgresql-common is already the newest version. postgresql-client-common is already the newest version. postgresql-8.1 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded. 19 not fully installed or removed. Need to get 0B/3023kB of archives. After unpacking 0B of additional disk space will be used. Selecting previously deselected package postgresql-8.1. (Reading database ... 77138 files and directories currently installed.) Preparing to replace postgresql-8.1 8.1.4-0ubuntu1 (using .../postgresql- 8.1_8.1.4-0ubuntu1_i386.deb) ... Unpacking replacement postgresql-8.1 ... Setting up jed-common (0.99.16+0.99.17-pre111-0ubuntu1) ... Setting up jed (0.99.16+0.99.17-pre111-0ubuntu1) ... Setting up libtiff4 (3.7.4-1ubuntu3.2) ... Setting up libpq3 (7.4.12-3) ... Setting up postgresql-client-common (53ubuntu3) ... Setting up postgresql-client-7.4 (7.4.12-3) ... Setting up postgresql-common (53ubuntu3) ... chown: cannot access `/var/lib/postgresql': No such file or directory dpkg: error processing postgresql-common (--configure): subprocess post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of postgresql-7.4: postgresql-7.4 depends on postgresql-common (>= 24); however: Package postgresql-common is not configured yet. dpkg: error processing postgresql-7.4 (--configure): dependency problems - leaving unconfigured Setting up postgresql-client-8.1 (8.1.4-0ubuntu1) ... dpkg: dependency problems prevent configuration of postgresql-8.1: postgresql-8.1 depends on postgresql-common (>= 39); however: Package postgresql-common is not configured yet. dpkg: error processing postgresql-8.1 (--configure): dependency problems - leaving unconfigured Setting up postgresql-client (7.5.16.1) ... Setting up libgtk2.0-common (2.8.20-0ubuntu1) ... Setting up pgadmin3-data (1.2.2-1.1) ... Setting up libpango1.0-0 (1.12.3-0ubuntu3) ... Setting up libgtk2.0-0 (2.8.20-0ubuntu1) ... Setting up libwxgtk2.6-0 (2.6.1.2ubuntu2) ... Setting up pgadmin3 (1.2.2-1.1) ... Setting up libpango1.0-common (1.12.3-0ubuntu3) ... Updating the modules list for Pango-1.5.0...done. Cleaning up font configuration of pango... Cleaning up category xfont.. Updating font configuration of pango... Cleaning up category xfont.. Updating category xfont.. Setting up libgtk2.0-bin (2.8.20-0ubuntu1) ... Updating the IM modules list for GTK+-2.4.0...done. Updating the gdk-pixbuf loaders list for GTK+-2.4.0...done. Errors were encountered while processing: postgresql-common postgresql-7.4 postgresql-8.1 E: Sub-process /usr/bin/dpkg returned an error code (1) Also it displayed a screen telling me that it was a configuration screen for the postgresql server, but it told me that I still had some postgresql-7.4components installed and that when I installed the new postgresql-8.1 it would create a new cluster overriding the old ones. The output for sudo dpkg -P postgresql-8.1 postgresql-client-8.1 is: [EMAIL PROTECTED]:~# dpkg -P postgresql-8.1 postgresql-client-8.1 (Reading database ... 77137 files and directories currently installed.) Removing postgresql-8.1 ... Purging configuration files for postgresql-8.1 ... Removing postgresql-client-8.1 .. Ok, now I removed the postgresql-8.1, postgresql-common and the postgresql-7.4 and installed again the postgresql-8.1 using apt-get install. I've tryed the postgres server and now it works as it should be! Thank you very much, Felipe -- postgresql won't re-install or be removed https://launchpad.net/bugs/55830 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs