[Pkg-postgresql-public] Bug#877920: postgresql-common: pg_upgradecluster 9.6 -> 10 fails (locale problem)

Karsten Hilbert Karsten.Hilbert at gmx.net
Sat Oct 7 15:57:36 UTC 2017


On Sat, Oct 07, 2017 at 05:46:07PM +0200, Karsten Hilbert wrote:

> > Can you check if the upgrade works properly if you remove the
> > "unless"?
> > 
> >      chomp $ctype;
> >      chomp $collate;
> >      print STDERR "$ctype / $collate\n";
> >      return ($ctype, $collate);
> 
> Unfortunately not:
> 
> 	root at hermes:~/bin# pg_upgradecluster 9.6 main
> 	de_DE.UTF-8 / de_DE.UTF-8
> 	0
> 	Error: could not get cluster locales

Digging deeper: pg_upgradecluster does

	unless ($encoding && $old_lc_ctype && $old_lc_collate) {...}

	$encoding comes from get_db_encoding

	which also uses psql, which needs -X, too, in PgCommon.pm

Et voila.

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



More information about the Pkg-postgresql-public mailing list