← Back to team overview

desktop-packages team mailing list archive

[Bug 1383445] [NEW] pg_createcluster should not silently ignore locale failure

 

Public bug reported:

Ubuntu Version: 14.04
PostgreSQL version 9.3.5

The way it is now:

1. pg_createcluster will take a --locale switch, in order to initialize
the cluster with default emplate databases using, for example, en_US or
LATIN1.

2. if pg_createcluster is unable to initdb with that locale (for
example, if it's missing in the environment), it **silently fails** and
reports success, creating the cluster instead as SQL_ASCII, which format
is deprecated by the PostgreSQL project.

3. At that point, the user can happily go on to load all of their data
into a database in the wrong encoding, resulting in likely extensive
downtimes later to fix the problem, and possible data corruption.

The way it should be:

On step 2, pg_createcluster should fail with an error message.

This is per the documentation, which says that pg_createcluster will do
this.  However, it is inconsistent and user-hostile behavior, and should
be changed.

I do not know at this time whether this undesirable behavior is from the
upstream Debian postgresql-common or not.

** Affects: postgresql-common (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to postgresql-common in Ubuntu.
https://bugs.launchpad.net/bugs/1383445

Title:
  pg_createcluster should not silently ignore locale failure

Status in “postgresql-common” package in Ubuntu:
  New

Bug description:
  Ubuntu Version: 14.04
  PostgreSQL version 9.3.5

  The way it is now:

  1. pg_createcluster will take a --locale switch, in order to
  initialize the cluster with default emplate databases using, for
  example, en_US or LATIN1.

  2. if pg_createcluster is unable to initdb with that locale (for
  example, if it's missing in the environment), it **silently fails**
  and reports success, creating the cluster instead as SQL_ASCII, which
  format is deprecated by the PostgreSQL project.

  3. At that point, the user can happily go on to load all of their data
  into a database in the wrong encoding, resulting in likely extensive
  downtimes later to fix the problem, and possible data corruption.

  The way it should be:

  On step 2, pg_createcluster should fail with an error message.

  This is per the documentation, which says that pg_createcluster will
  do this.  However, it is inconsistent and user-hostile behavior, and
  should be changed.

  I do not know at this time whether this undesirable behavior is from
  the upstream Debian postgresql-common or not.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1383445/+subscriptions


Follow ups

References