pg_createcluster should not silently ignore locale failure

Bug #1383445 reported by Josh Berkus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-common (Ubuntu)
Triaged
Medium
Unassigned

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.

Martin Pitt (pitti)
Changed in postgresql-common (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.