Your message dated Fri, 01 Mar 2019 21:24:30 +0000
with message-id <[email protected]>
and subject line Bug#920248: fixed in postgresql-common 200
has caused the Debian Bug report #920248,
regarding pg_upgradecluster fails with inadequate error message
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
920248: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920248
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: postgresql-common
Version: 181+deb9u2
Severity: important
I was upgrading a few PostgreSQL servers. Most were successful, one of
them would fail with this error:
# pg_upgradecluster 9.4 main
Error: could not get cluster locales
I checked locale settings on the host (locale ; locale -a), in the
database (show all) and in postgresql.conf. Nothing obviously wrong. I
used
dpkg-reconfigure locales
to install all possible locales too but this didn't resolve the issue.
Web searches find many examples of this error. Example:
https://serverfault.com/questions/909624/pg-upgradecluster-fails-with-error-could-not-get-cluster-locales?rq=1
"sometimes, in Ubuntu systems, if ssh login user's locale is different"
but that was also a red herring.
https://www.postgresql.org/message-id/CABnTomKNDj%2BorMgyPaPtFkNoBFCuSWnzSAd0X0%2BX4LHSgUbEDQ%40mail.gmail.com
also suggests running pg_upgrade manually.
Another page suggested some users made it work if they manually stop the
service with systemctl before running pg_upgradecluster, that didn't
help me either.
I decided to trace the scripts:
apt install libdevel-trace-perl
cp /usr/bin/pg_upgradecluster /tmp
perl -d:Trace -T /tmp/pg_upgradecluster 9.4 main
The trace output helped me identify where the script was really failing
and add some debugging / print statements.
In my case, I found that it was failing to find the port number. In
postgresql.conf, the "port" parameter was commented on this host, so it
would use the default, 5432
This leads me to two conclusions:
- it needs to handle these specific cases (e.g. port number) automatically
- it needs to give more accurate errors - in my case, the error "could
not get cluster locales" was misleading for me
Regards,
Daniel
--- End Message ---
--- Begin Message ---
Source: postgresql-common
Source-Version: 200
We believe that the bug you reported is fixed in the latest version of
postgresql-common, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Christoph Berg <[email protected]> (supplier of updated postgresql-common package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Fri, 01 Mar 2019 20:47:06 +0100
Source: postgresql-common
Binary: postgresql-common postgresql-client-common postgresql-server-dev-all
postgresql postgresql-client postgresql-doc postgresql-contrib postgresql-all
Architecture: source
Version: 200
Distribution: unstable
Urgency: medium
Maintainer: Debian PostgreSQL Maintainers <[email protected]>
Changed-By: Christoph Berg <[email protected]>
Description:
postgresql - object-relational SQL database (supported version)
postgresql-all - metapackage depending on all PostgreSQL server packages
postgresql-client - front-end programs for PostgreSQL (supported version)
postgresql-client-common - manager for multiple PostgreSQL client versions
postgresql-common - PostgreSQL database-cluster manager
postgresql-contrib - additional facilities for PostgreSQL (supported version)
postgresql-doc - documentation for the PostgreSQL database management system
postgresql-server-dev-all - extension build tool for multiple PostgreSQL
versions
Closes: 653870 810615 839954 872660 891234 910991 916449 918784 920248
Changes:
postgresql-common (200) unstable; urgency=medium
.
* pg_createcluster: Don't refuse explicit -p argument even when port is
already in use. (Closes: #653870)
* pg_createcluster: Override suggested cluster start command in initdb.
(Closes: #872660)
* pg_upgradecluster, t/052_upgrade_encodings.t: pg_dumpall 11 retains the
database encoding, so switching encodings via dump-restore does not work
anymore.
* pg_upgradecluster: Deprecate 'replacement_sort_tuples' in version 11.
* pg_upgradecluster: Migrate postgresql.auto.conf to new cluster.
(Closes: #810615)
* pg_ctlcluster: Die early if logfile is not available. (Closes: #891234)
* pg_ctlcluster: Die early if pg_ctl cannot be found. (See: #918784)
* pg_ctlcluster: Document --skip-systemctl-redirect, and skip redirect if
--foreground is requested.
* pg_renamecluster: Notify systemd. (Closes: #839954)
* pg_renamecluster: Document that cluster_name is updated as well.
* pg_dropcluster: Delete tablespace directories. (Closes: #916449)
* pg_dropcluster: Silence warning if data_directory is already gone.
Spotted by Jean-Christophe Arnu, merci!
* get_cluster_port: Fall back to 5432 if port is not defined in config.
(Closes: #920248)
* read_cluster_conf_file: Use cluster_data_directory instead of hardcoding
/var/lib/postgresql.
* [email protected]: Add After=network.target to ensure the server is
stopped before networking goes down on shutdown. Thanks Elrond!
(Closes: #910991)
* [email protected]: Drop /var prefix from PIDFile, systemd complained
about legacy directory /var/run/postgresql.
* postgresql-generator: Don't attempt to auto-start removed versions.
(Closes: #918784)
Checksums-Sha1:
d6675402a5fe29fd14fb57c3d4539b7617f2d8f6 2309 postgresql-common_200.dsc
fe8db48a9d888ed6008ae803a77298430cf7ee5e 212312 postgresql-common_200.tar.xz
Checksums-Sha256:
f1328615b2b2b99cd0ac5d641887670f75b3b355a056e35ec2618fdf93ccc221 2309
postgresql-common_200.dsc
ccd6f45ce5674d1a0115be98f370e0016b96edba796584ebc46bc933e42c8761 212312
postgresql-common_200.tar.xz
Files:
88628166ef7ccb1b61a842159d1b799b 2309 database optional
postgresql-common_200.dsc
fa65f945b2cf4bf6a8c5a303014661e5 212312 database optional
postgresql-common_200.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEXEj+YVf0kXlZcIfGTFprqxLSp64FAlx5mrkACgkQTFprqxLS
p67U6RAAnoidZEhJJL+vvNhewfEXqseDJgY5NJ7vVsewdAg33kDxwnbXXf562Qet
kyPwvIycL8sJJ2d3THPV7oRTUtAgjhx+JUWmpY3FHran3Em9jQ0oJrw297xrhJSc
lsznchLV0xmJHnCFVVWX6pOX576BMVQbMFC094VclW6OXEZNauvBOaLYakqjU5Xr
wjfPCJxzTIOQkOWap8hrNGGLA49rapX7p9sZY7V8naaybk3zclv/MuEZ1wXRc2Cz
x+TIWG7ceLFFndAtITBC0xX/k0dVXGPWxQbJkr970soLPIvMTxNr3WbMFamKwn03
LTbsf2zhO82i15fuaPNApE8CbBVjmbR9wUzH8oTcZVKwJj8N9XWArPU7TGqw2au1
sY+rhWxLv6jSVqrN75iiNtFJ5usFBQAWAAPl4rG+elLgDNTpTKZ8iMNiH/hncwUM
JBpSP+rzRZH7Of7vV/F+R9soNlF8akQNdEm4VXOrygk/dZOW/7wgDb62b/wiPgwF
9NZ6cWMmtLXxBBptARM+XctVzHbB5ac2Vu9tBkOeu2UfQC8eOTtS2RKUJ223RA0e
Lh4TfgV1I+AqwCxd6dN9oJiv18dN5209HjnNNDxkyEdqPMOJ9cEVqIDbVnmsbIR+
5lsIjoV0S2eRf61oXpPnCbMz5pubdvx9dTM3C1+tnzFbgilX9mE=
=STnB
-----END PGP SIGNATURE-----
--- End Message ---