Debian Bug report logs - #510658
postgresql-8.3: default cluster main not created

version graph

Package: postgresql-common; Maintainer for postgresql-common is Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>; Source for postgresql-common is src:postgresql-common.

Reported by: Xavi Drudis Ferran <xdrudis@tinet.cat>

Date: Sun, 4 Jan 2009 02:33:02 UTC

Severity: normal

Tags: confirmed, moreinfo, unreproducible, upstream

Merged with 525523

Found in versions postgresql-common/90, postgresql-common/98

Done: Martin Pitt <mpitt@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Pitt <mpitt@debian.org>:
Bug#510658; Package postgresql-8.3. (Sun, 04 Jan 2009 02:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xavi Drudis Ferran <xdrudis@tinet.cat>:
New Bug report received and forwarded. Copy sent to Martin Pitt <mpitt@debian.org>. (Sun, 04 Jan 2009 02:33:06 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Xavi Drudis Ferran <xdrudis@tinet.cat>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: postgresql-8.3: default cluster main not created
Date: Sun, 04 Jan 2009 03:31:20 +0100
[Message part 1 (text/plain, inline)]
Package: postgresql-8.3
Version: 8.3.5-1
Severity: important



Hello , and thanks for packaging postgresql in Debian. 
I've used it for some years (though I'm no expoert) and 
has always worked fine . 

This time I installed it on 2 amd64 PCs . 

I one it run ok, but in the other it didn't create the main 
cluster. /etc/postgresql and /var/lib/postgresql were empty
after installation. 

I tried /etc/init.d/postgresql-8.3 restart ,  aptitude reinstall and 
purge and 
install but 
still
it wouldn't create it. 

The only message I could see in the console was about Debian version 
5.0 being unknown (there's another bug about that but it said it's a 
warning only). 

After reading the docs I did a simple 

pg_createcluster 8.3  main --start

and it worked. It created the cluster, populating 
etc/postgresql/8.3/main and /var/lib/postgresql

I'm not sure it can be reproduced because the other PC I was installing 
at the same time had no issue at all. 

The installation was on 26.12.2008, I believe. 

I installed from a Lenny RC1 netinst CD for amd64. 
I think I picked file server and print server from the tasksel
I then did dpkg --set-selections from a list of packages 
taken from a laptop , I'll attach the list. 

I configured printers, ssh, X, etc.

And when I tried to access psql a week later, found there wasn't 
a cluster, only in one of the 2 PCs. 

I'm puzzled, but I'm also tired right now. 
I'm not sure this report it's useful, but I found it very strange, 
and didn't know where to llok for clues. It works now, but it's 
never failed installation like this before. I never had to create main.


-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages postgresql-8.3 depends on:
ii  libc6                 2.7-16             GNU C Library: Shared libraries
ii  libcomerr2            1.41.3-1           common error description library
ii  libkrb53              1.6.dfsg.4~beta1-4 MIT Kerberos runtime libraries
ii  libldap-2.4-2         2.4.11-1           OpenLDAP libraries
ii  libpam0g              1.0.1-4+b1         Pluggable Authentication Modules l
ii  libpq5                8.3.5-1            PostgreSQL C client library
ii  libssl0.9.8           0.9.8g-14          SSL shared libraries
ii  libxml2               2.6.32.dfsg-5      GNOME XML library
ii  locales               2.7-16             GNU C Library: National Language (
ii  postgresql-client-8.3 8.3.5-1            front-end programs for PostgreSQL 
ii  postgresql-common     94                 PostgreSQL database-cluster manage
ii  ssl-cert              1.0.23             simple debconf wrapper for OpenSSL
ii  tzdata                2008h-2            time zone and daylight-saving time

postgresql-8.3 recommends no packages.

Versions of packages postgresql-8.3 suggests:
ii  pidentd [ident-server]      3.0.19.ds1-4 TCP/IP IDENT protocol server with 

-- no debconf information
[paquets (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#510658; Package postgresql-8.3. (Sun, 04 Jan 2009 20:42:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. (Sun, 04 Jan 2009 20:42:06 GMT) Full text and rfc822 format available.

Message #10 received at 510658@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: Xavi Drudis Ferran <xdrudis@tinet.cat>, 510658@bugs.debian.org
Subject: Re: Bug#510658: postgresql-8.3: default cluster main not created
Date: Sun, 4 Jan 2009 21:37:48 +0100
Hi Xavi,

Xavi Drudis Ferran [2009-01-04  3:31 +0100]:
> I tried /etc/init.d/postgresql-8.3 restart ,  aptitude reinstall and 
> purge and 
> install but 
> still
> it wouldn't create it. 

Since you can create it manually, there doesn't seem to be a principal
problem with it (missing locales or so). The usual reason is that
there is a previously existing cluster in /etc/postgresql/ and/or
/var/lib/postgresql/.

Can you still reproduce this by purging postgresql-8.3 and doing

  apt-get install postgresql-8.3

in a terminal as root? Please copy&paste the complete output of this.

> The only message I could see in the console was about Debian version 
> 5.0 being unknown (there's another bug about that but it said it's a 
> warning only). 

Yes, that's a warning. I'll get that fixed soon.

Thanks!

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)




Tags added: moreinfo, unreproducible Request was from Martin Pitt <mpitt@debian.org> to control@bugs.debian.org. (Tue, 06 Jan 2009 09:24:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Pitt <mpitt@debian.org>:
Bug#510658; Package postgresql-8.3. (Fri, 16 Jan 2009 04:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to daniel@debian.org:
Extra info received and forwarded to list. Copy sent to Martin Pitt <mpitt@debian.org>. (Fri, 16 Jan 2009 04:57:02 GMT) Full text and rfc822 format available.

Message #17 received at 510658@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel@debian.org>
To: 510658@bugs.debian.org, 510658-submitter@bugs.debian.org
Subject: Re: postgresql-8.3: default cluster main not created
Date: Fri, 16 Jan 2009 05:54:20 +0100
Hi,

I can reproduce this bug with just newly setup lenny system, postgresql
does not create the main cluster.

root@XXXXXX:/etc/init.d# apt-cache policy postgresql
postgresql:
  Installed: 8.3.5-1
  Candidate: 8.3.5-1
  Version table:
 *** 8.3.5-1 0
        500 http://ftp.de.debian.org lenny/main Packages
        100 /var/lib/dpkg/status
root@XXXXXX:/etc/init.d# apt-cache policy postgresql-8.3
postgresql-8.3:
  Installed: 8.3.5-1
  Candidate: 8.3.5-1
  Version table:
 *** 8.3.5-1 0
        500 http://ftp.de.debian.org lenny/main Packages
        100 /var/lib/dpkg/status
root@XXXXXX:/etc/init.d#

Regards,
Daniel

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/




Message sent on to Xavi Drudis Ferran <xdrudis@tinet.cat>:
Bug#510658. (Fri, 16 Jan 2009 04:57:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Pitt <mpitt@debian.org>:
Bug#510658; Package postgresql-8.3. (Fri, 16 Jan 2009 11:36:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to a_regidor@yahoo.es:
Extra info received and forwarded to list. Copy sent to Martin Pitt <mpitt@debian.org>. (Fri, 16 Jan 2009 11:36:03 GMT) Full text and rfc822 format available.

Message #25 received at 510658@bugs.debian.org (full text, mbox):

From: Antonio Regidor García <a_regidor@yahoo.es>
To: 510658@bugs.debian.org
Subject: postgresql-8.3: Same problem here
Date: Fri, 16 Jan 2009 11:35:03 +0000 (GMT)
Followup-For: Bug #510658
Package: postgresql-8.3
Version: 8.3.5-1

I had the same problem. I installed lenny yesterday (netinstall beta2), and postgres today, but the main cluster was not created. Then I purged the packages and did:

apt-get install postgresql-8.3

as you suggested. Now the main cluster was created. I purged all postgresql related packages again and reinstalled them all using aptitude (as I did the first time) but the main cluster was also created. I can't reproduce the bug anymore (at least without reinstalling lenny). Here is the output of the above command (translated from Spanish):

Reading package list...
Creating dependency tree...
Reading state information...
The following extra packages will be installed:
  openssl-blacklist postgresql-common ssl-cert
Suggested packages:
  oidentd ident-server
These NEW packages will be installed:
  openssl-blacklist postgresql-8.3 postgresql-common ssl-cert
0 updated, 4 will be installed, 0 will be deleted and 0 not updated.
0B/11,7MB will be downloaded.
27,1MB of disk will be used after this operation.
Do you want to continue [Y/n]? Preconfiguring packages ...
Selecting the not previously selected package openssl-blacklist.
(Reading database ...  
33946 files and directories actually installed.)
Unpacking openssl-blacklist (from .../openssl-blacklist_0.4.2_all.deb) ...
Selecting the not previously selected package postgresql-common.
Unpacking postgresql-common (from .../postgresql-common_94_all.deb) ...
Selecting the not previously selected package ssl-cert.
Unpacking ssl-cert (from .../ssl-cert_1.0.23_all.deb) ...
Selecting the not previously selected package postgresql-8.3.
Unpacking postgresql-8.3 (from .../postgresql-8.3_8.3.5-1_i386.deb) ...
Processing trigers for man-db ...
Configuring openssl-blacklist (0.4.2) ...
Configuring postgresql-common (94) ...
Configuring ssl-cert (1.0.23) ...
Configuring postgresql-8.3 (8.3.5-1) ...
Creating new cluster (configuration: /etc/postgresql/8.3/main, data: /var/lib/postgresql/8.3/main)...
Moving configuration file /var/lib/postgresql/8.3/main/postgresql.conf to /etc/postgresql/8.3/main...
Moving configuration file /var/lib/postgresql/8.3/main/pg_hba.conf to /etc/postgresql/8.3/main...
Moving configuration file /var/lib/postgresql/8.3/main/pg_ident.conf to /etc/postgresql/8.3/main...
Configuring postgresql.conf to use port 5432...
Starting PostgreSQL 8.3 database server: main.




-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages postgresql-8.3 depends on:
ii  libc6                 2.7-18             GNU C Library: Shared libraries
ii  libcomerr2            1.41.3-1           common error description library
ii  libkrb53              1.6.dfsg.4~beta1-5 MIT Kerberos runtime libraries
ii  libldap-2.4-2         2.4.11-1           OpenLDAP libraries
ii  libpam0g              1.0.1-4            Pluggable Authentication Modules l
ii  libpq5                8.3.5-1            PostgreSQL C client library
ii  libssl0.9.8           0.9.8g-15          SSL shared libraries
ii  libxml2               2.6.32.dfsg-5      GNOME XML library
ii  locales               2.7-18             GNU C Library: National Language (
ii  postgresql-client-8.3 8.3.5-1            front-end programs for PostgreSQL 
ii  postgresql-common     94                 PostgreSQL database-cluster manage
ii  ssl-cert              1.0.23             simple debconf wrapper for OpenSSL
ii  tzdata                2008h-2            time zone and daylight-saving time

postgresql-8.3 recommends no packages.

Versions of packages postgresql-8.3 suggests:
pn  oidentd | ident-server        <none>     (no description available)

-- no debconf information








Information forwarded to debian-bugs-dist@lists.debian.org, Martin Pitt <mpitt@debian.org>:
Bug#510658; Package postgresql-8.3. (Fri, 13 Feb 2009 16:15:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sebastián Cruz <scruz@gisworking.com>:
Extra info received and forwarded to list. Copy sent to Martin Pitt <mpitt@debian.org>. (Fri, 13 Feb 2009 16:15:13 GMT) Full text and rfc822 format available.

Message #30 received at 510658@bugs.debian.org (full text, mbox):

From: Sebastián Cruz <scruz@gisworking.com>
To: 510658@bugs.debian.org
Subject: [postgresql-8.3] default cluster main not created
Date: Fri, 13 Feb 2009 13:14:15 -0300
Package: postgresql-8.3
Version: 8.3.6-1

--- Please enter the report below this line. ---

I've experienced this bug in a newly installed Lenny. After purging and installing again it worked.

I think you should remove the "unreproducible" tag?

Regards,

CruX
(aka Sebastian Cruz)

--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.26-1-amd64

Debian Release: 5.0
  900 testing         security.debian.org 
  900 testing         ftp.debian.org 
  600 unstable        ftp.debian.org 
  500 testing         ftp.heanet.ie 
  100 experimental    ftp.debian.org 

--- Package information. ---
Depends                         (Version) | Installed
=========================================-+-================
libc6                          (>= 2.7-1) | 2.7-18
libcomerr2                    (>= 1.33-3) | 1.41.3-1
libkrb53                  (>= 1.6.dfsg.2) | 1.6.dfsg.4~beta1-5
libldap-2.4-2                  (>= 2.4.7) | 2.4.11-1
libpam0g                    (>= 0.99.7.1) | 1.0.1-5
libpq5                     (>= 8.3~beta1) | 8.3.6-1
libssl0.9.8                 (>= 0.9.8f-5) | 0.9.8g-15
libxml2                       (>= 2.6.27) | 2.6.32.dfsg-5
postgresql-client-8.3                     | 
postgresql-common                 (>= 79) | 
tzdata                                    | 2008h-2







Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#510658; Package postgresql-8.3. (Sun, 15 Feb 2009 16:28:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. (Sun, 15 Feb 2009 16:28:10 GMT) Full text and rfc822 format available.

Message #35 received at 510658@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: daniel@debian.org, 510658@bugs.debian.org, 510658-submitter@bugs.debian.org
Subject: Re: Bug#510658: postgresql-8.3: default cluster main not created
Date: Sun, 15 Feb 2009 17:26:21 +0100
Hello all,

if anyone can still reproduce that, please get the output of

  ls -lR /etc/postgresql /var/lib/postgresql /var/log/postgresql
  pg_lsclusters

before purging and reinstalling. Thanks!

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)




Message sent on to Xavi Drudis Ferran <xdrudis@tinet.cat>:
Bug#510658. (Sun, 15 Feb 2009 16:28:22 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Pitt <mpitt@debian.org>:
Bug#510658; Package postgresql-8.3. (Wed, 18 Feb 2009 10:48:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Benoit Hamet <caeies@caeies.org>:
Extra info received and forwarded to list. Copy sent to Martin Pitt <mpitt@debian.org>. (Wed, 18 Feb 2009 10:48:05 GMT) Full text and rfc822 format available.

Message #43 received at 510658@bugs.debian.org (full text, mbox):

From: Benoit Hamet <caeies@caeies.org>
To: Debian Bug Tracking System <510658@bugs.debian.org>
Subject: postgresql-8.3: Requested infos by Martin.
Date: Wed, 18 Feb 2009 11:45:40 +0100
Package: postgresql-8.3
Version: 8.3.6-1
Followup-For: Bug #510658

Hi all,

Same bug here, installed machine 2 weeks ago, but only using the posgresql data base today :
Was a beta2 netinstall, choosing the package with database task.


here's the output requested by Martin :

$ ls -lR /etc/postgresql /var/lib/postgresql /var/log/postgresql
/etc/postgresql:
total 0

/var/lib/postgresql:
total 0

/var/log/postgresql:
total 0

$ pg_lsclusters
Version Cluster   Port Status Owner    Data directory                     Log file


So nothing was created. I try the /etc/init.d/posgresql start trick, but doesn't work. Try to reconfigure it without success.

So will now purge it and reinstall.

I can probably help a little bit on that one, since I have planned to do some other lenny install on amd64.

Hope this help anyway.

Regards,

Caeies.

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages postgresql-8.3 depends on:
ii  libc6                 2.7-18             GNU C Library: Shared libraries
ii  libcomerr2            1.41.3-1           common error description library
ii  libkrb53              1.6.dfsg.4~beta1-5 MIT Kerberos runtime libraries
ii  libldap-2.4-2         2.4.11-1           OpenLDAP libraries
ii  libpam0g              1.0.1-5            Pluggable Authentication Modules l
ii  libpq5                8.3.6-1            PostgreSQL C client library
ii  libssl0.9.8           0.9.8g-15          SSL shared libraries
ii  libxml2               2.6.32.dfsg-5      GNOME XML library
ii  locales               2.7-18             GNU C Library: National Language (
ii  postgresql-client-8.3 8.3.6-1            front-end programs for PostgreSQL 
ii  postgresql-common     94lenny1           PostgreSQL database-cluster manage
ii  ssl-cert              1.0.23             simple debconf wrapper for OpenSSL
ii  tzdata                2008h-2            time zone and daylight-saving time

postgresql-8.3 recommends no packages.

Versions of packages postgresql-8.3 suggests:
pn  oidentd | ident-server        <none>     (no description available)

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#510658; Package postgresql-8.3. (Sat, 28 Feb 2009 12:48:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. (Sat, 28 Feb 2009 12:48:05 GMT) Full text and rfc822 format available.

Message #48 received at 510658@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: Xavi Drudis Ferran <xdrudis@tinet.cat>, 510658@bugs.debian.org, daniel@debian.org, Antonio Regidor García <a_regidor@yahoo.es>, Sebastián Cruz <scruz@gisworking.com>, Benoit Hamet <caeies@caeies.org>
Subject: Re: Bug#510658: postgresql-8.3: default cluster main not created
Date: Sat, 28 Feb 2009 13:46:32 +0100
[Message part 1 (text/plain, inline)]
Hello all,

Xavi Drudis Ferran [2009-01-04  3:31 +0100]:
> I one it run ok, but in the other it didn't create the main cluster.
> /etc/postgresql and /var/lib/postgresql were empty after
> installation. 
>
> I tried /etc/init.d/postgresql-8.3 restart ,  aptitude reinstall and
> purge and install but still it wouldn't create it. 

Unfortunately I'm still in the dark about this one; in particular, I
haven't been able to reproduce the situation where /etc/postgresql/
exists, but is empty.

So let's collect some finer details here.

First, I assume that most of you installed postgresql-8.3 *after* the
initial Debian installation, i. e. you did not choose the database
server task in debian-installer? If you did, then please have a look
at /var/log/installer and check if they have anything regarding to
postgresql, in particular the package install log.

But many reporters pointed out that the installed PostgreSQL later,
thus I don't think it is an install-time only bug. Can anyone of you
still say whether you already had the package "locales" installed when
you installed postgresql-8.3? Did you have a locale configured and
used?

I bootstrapped a fresh lenny system and did three experiments (with
cleaning up after everyone with "apt-get purge --auto-remove
postgresql-8.3", which removes everything down to libxml2, python,
perl-modules, etc.)

 - Installing postgresql-8.3 without any $LANG or $LC_ALL set. This
   works fine, I get a default 8.3/main cluster with C encoding
   (SQL_ASCII).

 - Installing postgresql-8.3 without locales installed, but
   LANG=de_DE.UTF-8. As expected, I get lots of "invalid locale"
   errors for packages, and postgresql-8.3 does not configure a
   cluster because of the invalid locale:

   |Setting up postgresql-8.3 (8.3.6-1) ...
   |perl: warning: Setting locale failed.
   |perl: warning: Please check that your locale settings:
   |	LANGUAGE = (unset),
   |	LC_ALL = (unset),
   |	LANG = "de_DE.UTF-8"
   |    are supported and installed on your system.
   |perl: warning: Falling back to the standard locale ("C").
   |Error: The locale requested by the environment is invalid.
   |Error: could not create default cluster. Please create it manually with
   |
   |  pg_createcluster 8.3 main --start
   |
   |or a similar command (see 'man pg_createcluster').

   However, in this case /etc/postgresql/ is *not* created. This makes
   me believe that the error you encountered is not tied to locales
   (because it is also pretty uncommon to have broken locales, and I
   got so many reports about this problem).

  - Generating de_DE.UTF-8 locale, installing postgresql-8.3. Works
    flawlessly and I get an 8.3/main cluster automatically.

Finally, just to make sure, I did the same experiment with installing
"postgresql" instead of "postgresql-8.3". It's just an empty
metapackage, though, and as expected it gives exactly the same
results.

So let's have a closer look at the code. Either the cluster is not
even attempted to be created, or it fails to do so.

First, failure case: This usually happens if the locale is invalid,
but that wouldn't leave an /etc/postgresql/ behind (see above). Then
there can be all sorts of file system things, such as /var not being
writable, but since it works with a manual pg_createcluster, I don't
believe that this is the reason for all your reports.

Then, the "not attempted" case: This is determined in
/usr/share/postgresql-common/maintscripts-functions,
configure_version():

   |# arguments: <major version> <most recently configured package version>
   |configure_version() {
   |    VERSION="$1"
   |
   |    # Create a main cluster for given version ($1) if no cluster already exists
   |    # for that version and we are installing from scratch.
   |    [ "$VERSION" ] || { echo "Error: configure_version: need version parameter" >&2; exit 1; }
   |    if [ ! -d "/etc/postgresql/$VERSION" ] || [ -z "$(ls /etc/postgresql/$VERSION)" ] || \
   |       [ -z "$(ls /etc/postgresql/$VERSION/*/postgresql.conf 2>/dev/null)" ]; then
   |        [ "$2" ] || /usr/bin/pg_createcluster -u postgres $VERSION main || {
   |        echo "Error: could not create default cluster. Please create it manually with
   |
   |  pg_createcluster $VERSION main --start
   |
   |or a similar command (see 'man pg_createcluster')." >&2
   |        }
   |    fi
   |
   |    _link_manpages "$VERSION" "postgresql-$VERSION" postmaster.1.gz
   |}

So this means that a cluster is only created automatically if:

 1. /etc/postgresql/8.3/ does not exist, or /etc/postgresql/8.3/ is
    empty, or /etc/postgresql/8.3/main/postgresql.conf does not exist
 2. The package postgresql-8.3 was not installed before, or was
    purged.

It seems very unlikely to me that those conditions were not met with a
fresh Lenny install, though, but perhaps it gives some of you a clue
what could have happened.

How exactly did you install Lenny? Which medium, which tasks, which
locales? Could any of you attach the installer logs
(/var/log/installer)?

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[signature.asc (application/pgp-signature, inline)]

Bug reassigned from package `postgresql-8.3' to `postgresql-common'. Request was from Martin Pitt <mpitt@debian.org> to control@bugs.debian.org. (Sat, 28 Feb 2009 13:21:16 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#510658; Package postgresql-common. (Sat, 28 Feb 2009 13:27:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. (Sat, 28 Feb 2009 13:27:10 GMT) Full text and rfc822 format available.

Message #55 received at 510658@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: 510658@bugs.debian.org
Cc: Xavi Drudis Ferran <xdrudis@tinet.cat>, daniel@debian.org, Antonio Regidor García <a_regidor@yahoo.es>, Sebastián Cruz <scruz@gisworking.com>, Benoit Hamet <caeies@caeies.org>
Subject: Re: Bug#510658: postgresql-8.3: default cluster main not created
Date: Sat, 28 Feb 2009 14:26:27 +0100
[Message part 1 (text/plain, inline)]
Hello again everyone,

Martin Pitt [2009-02-28 13:46 +0100]:
> First, I assume that most of you installed postgresql-8.3 *after* the
> initial Debian installation, i. e. you did not choose the database
> server task in debian-installer? If you did, then please have a look
> at /var/log/installer and check if they have anything regarding to
> postgresql, in particular the package install log.

In particular, please check if you have the same symptoms as
http://bugs.debian/org/517389, i. e. you get something like

  /dev/null: Permission denied

in the installer environment.

Thanks,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Pitt <mpitt@debian.org>:
Bug#510658; Package postgresql-common. (Sun, 01 Mar 2009 23:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xavi Drudis Ferran <xdrudis@tinet.cat>:
Extra info received and forwarded to list. Copy sent to Martin Pitt <mpitt@debian.org>. (Sun, 01 Mar 2009 23:09:02 GMT) Full text and rfc822 format available.

Message #60 received at 510658@bugs.debian.org (full text, mbox):

From: Xavi Drudis Ferran <xdrudis@tinet.cat>
To: Martin Pitt <mpitt@debian.org>
Cc: 510658@bugs.debian.org, Xavi Drudis Ferran <xdrudis@tinet.cat>, daniel@debian.org, Antonio Regidor García <a_regidor@yahoo.es>, Sebastián Cruz <scruz@gisworking.com>, Benoit Hamet <caeies@caeies.org>
Subject: Re: Bug#510658: postgresql-8.3: default cluster main not created
Date: Mon, 2 Mar 2009 00:05:32 +0100
On Sat, Feb 28, 2009 at 02:26:27PM +0100, Martin Pitt wrote:
> Hello again everyone,
> 
> Martin Pitt [2009-02-28 13:46 +0100]:
> > First, I assume that most of you installed postgresql-8.3 *after* the
> > initial Debian installation, i. e. you did not choose the database
> > server task in debian-installer? If you did, then please have a look
> > at /var/log/installer and check if they have anything regarding to
> > postgresql, in particular the package install log.
> 
> In particular, please check if you have the same symptoms as
> http://bugs.debian/org/517389, i. e. you get something like
> 
>   /dev/null: Permission denied
> 
> in the installer environment.
> 

I don't remember having seen that.
But I'm pretty sure I would have reported it if I had seen it, even tired
as I was when filing the bug.




-- 
xdrudis@tinet.cat
Signa per fer Collserola parc natural com cal
http://www.collserola.org/salvemelparcnatural/




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Pitt <mpitt@debian.org>:
Bug#510658; Package postgresql-common. (Sun, 01 Mar 2009 23:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xavi Drudis Ferran <xdrudis@tinet.cat>:
Extra info received and forwarded to list. Copy sent to Martin Pitt <mpitt@debian.org>. (Sun, 01 Mar 2009 23:36:02 GMT) Full text and rfc822 format available.

Message #65 received at 510658@bugs.debian.org (full text, mbox):

From: Xavi Drudis Ferran <xdrudis@tinet.cat>
To: Martin Pitt <mpitt@debian.org>
Cc: Xavi Drudis Ferran <xdrudis@tinet.cat>, 510658@bugs.debian.org, daniel@debian.org, Antonio Regidor García <a_regidor@yahoo.es>, Sebastián Cruz <scruz@gisworking.com>, Benoit Hamet <caeies@caeies.org>
Subject: Re: Bug#510658: postgresql-8.3: default cluster main not created
Date: Mon, 2 Mar 2009 00:34:27 +0100
On Sat, Feb 28, 2009 at 01:46:32PM +0100, Martin Pitt wrote:
> Hello all,
> 
> First, I assume that most of you installed postgresql-8.3 *after* the
> initial Debian installation, i. e. you did not choose the database
> server task in debian-installer? If you did, then please have a look
> at /var/log/installer and check if they have anything regarding to
> postgresql, in particular the package install log.
>

I did an install without the dtabase task and after that I 
selected many packages for instalation, postgresql among them. 
 
> But many reporters pointed out that the installed PostgreSQL later,
> thus I don't think it is an install-time only bug. Can anyone of you
> still say whether you already had the package "locales" installed when
> you installed postgresql-8.3? Did you have a locale configured and
> used?
> 

I was using ca_ES.UTF-8. Apparently well configured/installed. 

> 
> First, failure case: This usually happens if the locale is invalid,
> but that wouldn't leave an /etc/postgresql/ behind (see above). Then
> there can be all sorts of file system things, such as /var not being
> writable, but since it works with a manual pg_createcluster, I don't
> believe that this is the reason for all your reports.
>

I didn't fic any of these before I could manually create the cluster. 
I installed with just the root partition and swap. And the partition 
was writeable. I checked the logs and I didn't see anything unusal, 
so I guess /var/log/ was writable. 

I don't know much more and that system is still running windows :( .
I think it's only been booted to linux once since my report, for some minutes only. 
  
> Then, the "not attempted" case: This is determined in
> /usr/share/postgresql-common/maintscripts-functions,
> configure_version():
> 
>    |# arguments: <major version> <most recently configured package version>
>    |configure_version() {
>    |    VERSION="$1"
>    |
>    |    # Create a main cluster for given version ($1) if no cluster already exists
>    |    # for that version and we are installing from scratch.
>    |    [ "$VERSION" ] || { echo "Error: configure_version: need version parameter" >&2; exit 1; }
>    |    if [ ! -d "/etc/postgresql/$VERSION" ] || [ -z "$(ls /etc/postgresql/$VERSION)" ] || \
>    |       [ -z "$(ls /etc/postgresql/$VERSION/*/postgresql.conf 2>/dev/null)" ]; then
>    |        [ "$2" ] || /usr/bin/pg_createcluster -u postgres $VERSION main || {
>    |        echo "Error: could not create default cluster. Please create it manually with
>    |
>    |  pg_createcluster $VERSION main --start
>    |
>    |or a similar command (see 'man pg_createcluster')." >&2
>    |        }
>    |    fi
>    |
>    |    _link_manpages "$VERSION" "postgresql-$VERSION" postmaster.1.gz
>    |}
> 
> So this means that a cluster is only created automatically if:
> 
>  1. /etc/postgresql/8.3/ does not exist, or /etc/postgresql/8.3/ is
>     empty, or /etc/postgresql/8.3/main/postgresql.conf does not exist

Mmm.. I copied some configurations from another machine. I don't think 
I copied  /etc/postgresql/8.3/main/postgresql.conf but I guess I might have. 
But I reported /etc/postgres was empty, so I guess I didn't copy it. 

>  2. The package postgresql-8.3 was not installed before, or was
>     purged.
>


It wasn't installed before and was ony purged after the issue appeared.
 
> It seems very unlikely to me that those conditions were not met with a
> fresh Lenny install, though, but perhaps it gives some of you a clue
> what could have happened.
> 

No clue, sorry. In fact the more I think of it the less I can explained it. 
It just happened. What gives ?

> How exactly did you install Lenny? Which medium, which tasks, which
> locales? Could any of you attach the installer logs
> (/var/log/installer)?
> 

I choosed Catalan language in the installer, and configured ca_ES.UTF-8 
as default locale. I can't attach the logs now, but I guess it doesn't 
matter since it wasn't installed from the debian installer.

Sorry for being unhelpful. 

Thanks for your caring for this bug report. 



-- 
xdrudis@tinet.cat
Signa per fer Collserola parc natural com cal
http://www.collserola.org/salvemelparcnatural/




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Pitt <mpitt@debian.org>:
Bug#510658; Package postgresql-common. (Wed, 04 Mar 2009 10:18:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Francois Fernandes <f.fernandes@gmx.net>:
Extra info received and forwarded to list. Copy sent to Martin Pitt <mpitt@debian.org>. (Wed, 04 Mar 2009 10:18:05 GMT) Full text and rfc822 format available.

Message #70 received at 510658@bugs.debian.org (full text, mbox):

From: Francois Fernandes <f.fernandes@gmx.net>
To: 510658@bugs.debian.org
Subject: Re: Bug#510658: postgresql-8.3: default cluster main not created
Date: Wed, 4 Mar 2009 11:13:17 +0100
Hi,

I  experienced  exactly the same problem. In my case I have chosen the
"database  server" task and I found the relevant (at least I think so)
part in the installer log:

Mar  3 13:51:11 in-target: Richte postgresql-common ein (94lenny1) ...
Mar  3 13:51:11 debconf: Obsolete command TITLE Konfiguriere postgresql-common called
Mar  3 14:51:12 groupadd[18560]: new group: name=postgres, GID=114
Mar  3 14:51:12 useradd[18564]: new user: name=postgres, UID=106, GID=114, home=/var/lib/postgresql, shell=/bin/bash
Mar  3 14:51:12 usermod[18569]: change user `postgres' password
Mar  3 14:51:12 chage[18574]: changed password expiry for postgres
Mar  3 14:51:12 chfn[18577]: changed user `postgres' information
Mar  3 14:51:12 gpasswd[18592]: add member postgres to group ssl-cert by root
Mar  3 13:51:12 in-target: Füge Benutzer postgres zu Gruppe ssl-cert hinzu
Mar  3 13:51:12 in-target: Richte postgresql-8.3 ein (8.3.6-1) ...
Mar  3 13:51:12 in-target: Creating new cluster (configuration: /etc/postgresql/8.3/main, data: /var/lib/postgresql/8.3/main)...
Mar  3 13:51:12 in-target: sh: /dev/null: Keine Berechtigung
Mar  3 13:51:12 in-target: fgets failure: Erfolg
Mar  3 13:51:12 in-target: Das Programm »postgres« wird von initdb benötigt, aber wurde nicht im
Mar  3 13:51:12 in-target: selben Verzeichnis wie »/usr/lib/postgresql/8.3/bin/initdb« gefunden.
Mar  3 13:51:12 in-target: Prüfen Sie Ihre Installation.
Mar  3 13:51:12 in-target: Error: initdb failed
Mar  3 13:51:12 in-target: Error: could not create default cluster. Please create it manually with
Mar  3 13:51:12 in-target:
Mar  3 13:51:12 in-target:   pg_createcluster 8.3 main --start
Mar  3 13:51:12 in-target:
Mar  3 13:51:12 in-target: or a similar command (see 'man pg_createcluster').


If you need help with the translation, please let me know.

Francois.





Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#510658; Package postgresql-common. (Wed, 04 Mar 2009 13:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. (Wed, 04 Mar 2009 13:27:03 GMT) Full text and rfc822 format available.

Message #75 received at 510658@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: Francois Fernandes <f.fernandes@gmx.net>, 510658@bugs.debian.org
Subject: Re: Bug#510658: postgresql-8.3: default cluster main not created
Date: Wed, 4 Mar 2009 14:24:03 +0100
Hello Francois,

Francois Fernandes [2009-03-04 11:13 +0100]:
> I  experienced  exactly the same problem. In my case I have chosen the
> "database  server" task and I found the relevant (at least I think so)
> part in the installer log:
> [...]
> Mar  3 13:51:12 in-target: sh: /dev/null: Keine Berechtigung

As I pointed out above, this is

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=517389

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)




Bug reassigned from package `postgresql-common' to `postgresql-8.3'. Request was from Martin Pitt <martin.pitt@ubuntu.com> to control@bugs.debian.org. (Sun, 22 Mar 2009 18:24:02 GMT) Full text and rfc822 format available.

Forcibly Merged 393945 510658. Request was from Martin Pitt <martin.pitt@ubuntu.com> to control@bugs.debian.org. (Sun, 22 Mar 2009 18:24:03 GMT) Full text and rfc822 format available.

Forcibly Merged 393945 510658 516312. Request was from Martin Pitt <martin.pitt@ubuntu.com> to control@bugs.debian.org. (Sun, 22 Mar 2009 18:24:06 GMT) Full text and rfc822 format available.

Disconnected #510658 from all other report(s). Request was from Martin Pitt <martin.pitt@ubuntu.com> to control@bugs.debian.org. (Sun, 22 Mar 2009 18:24:09 GMT) Full text and rfc822 format available.

Bug reassigned from package `postgresql-8.3' to `postgresql-common'. Request was from Martin Pitt <martin.pitt@ubuntu.com> to control@bugs.debian.org. (Sun, 22 Mar 2009 18:24:10 GMT) Full text and rfc822 format available.

Forcibly Merged 510658 525523. Request was from Martin Pitt <martin.pitt@ubuntu.com> to control@bugs.debian.org. (Sun, 06 Sep 2009 18:09:12 GMT) Full text and rfc822 format available.

Severity set to 'normal' from 'minor' Request was from Martin Pitt <martin.pitt@ubuntu.com> to control@bugs.debian.org. (Sun, 06 Sep 2009 18:19:42 GMT) Full text and rfc822 format available.

Reply sent to Martin Pitt <mpitt@debian.org>:
You have taken responsibility. (Sun, 21 Nov 2010 20:30:12 GMT) Full text and rfc822 format available.

Notification sent to Xavi Drudis Ferran <xdrudis@tinet.cat>:
Bug acknowledged by developer. (Sun, 21 Nov 2010 20:30:13 GMT) Full text and rfc822 format available.

Message #94 received at 510658-done@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: 510658-done@bugs.debian.org
Subject: Re: Bug#510658: postgresql-8.3: default cluster main not created
Date: Sun, 21 Nov 2010 21:26:26 +0100
Hello all,

As of today I am still unable to either reproduce this or explain it.
Evidently at least some of the "me too"s here were a victim of
http://bugs.debian.org/517389 (which has been fixed some time ago),
and for the others I never got sufficient data back.

So I am closing this report now, thanks everyone!

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)




Reply sent to Martin Pitt <mpitt@debian.org>:
You have taken responsibility. (Sun, 21 Nov 2010 20:30:13 GMT) Full text and rfc822 format available.

Notification sent to Susam Pal <susam.pal@gmail.com>:
Bug acknowledged by developer. (Sun, 21 Nov 2010 20:30:13 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 20 Dec 2010 07:32:27 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 25 07:02:17 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.