[Pkg-postgresql-public] Bug#810615: pg_upgradecluster seems not to honour some/all config from postgresql.auto.conf

Frank Gard frank at familie-gard.de
Sun Jan 10 14:03:47 UTC 2016


Package: postgresql-client-common
Version: 172.pgdg70+1

Hi!

I think I have found a bug similar to #787154. The latter is archived
now, so I have to report it as new.

Description:
I just installed PostgreSQL 9.5.0 and tried to migrate my 9.4.5 cluster
to the new version using pg_upgradecluster. At a first glance everything
worked fine, but the BaRMan I use had some problems when doing a backup:
It was hanging with "Asking PostgreSQL server to finalize the backup".
Looked for it in their F.A.Q. at http://www.pgbarman.org/faq/backup/,
and found that the problem was a misconfiguration of my WAL archiving,
especially the value of archive_command.

While trying to solve the problem, I found out, that I set the WAL
configuration using ALTER SYSTEM, so it was written to
/var/lib/postgresql/9.4/main/postgresql.auto.conf. I looked for the
corresponding /var/lib/postgresql/9.5/main/postgresql.auto.conf, but
without any success, there's no such file. The default config file, i.e.
/etc/postgresql/9.5/main/postgresql.conf contains the old and invalid
WAL config entries from times when I didn't use BaRMan, yet. The config
entrys in the auto-file are not transferred to the new cluster in any way!

Fortunately the archive_command didn't work, because the corresponding
program isn't available anymore. So my quick and dirty solution was:
1. doing as Linux user postgres
    grep -Eve '^\s*(#|$)' \
        /var/lib/postgresql/9.4/main/postgresql.auto.conf \
      | sed 's/^/ALTER SYSTEM SET /;s/$/\;/' \
      | psql
2. (less interesting here:) tidying up old BaRMan backup and
3. restarting PostgreSQL 9.5 cluster

Now, everything works fine for me, but I think that others should be
prevented from walking into this trap. Therefore I send this e-mail.
Please, could you check if there's any way to transfer the original
postgresql.auto.conf file (or at least its entrys) when using
pg_upgradecluster?

Just for completeness the "uname -a" output:
Linux host.dom.tld 2.6.32-042stab111.12 #1 SMP Thu Sep 17 11:38:20 MSK 2015 x86_64 GNU/Linux
If you need any further information, please let me know.

And, last but not least, thank you very much for your effort!
The Debian PostgreSQL tools are really admirable and I like very
much using them.

Thanks in advance,
Frank.

--

GnuPG / PGP info
================
Key-ID:      0xC8C1A552
Fingerprint: 3EFD EF94 4841 38B5 DB40 95D8 C69C 71C5 C8C1 A552

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-postgresql-public/attachments/20160110/89b411db/attachment.sig>


More information about the Pkg-postgresql-public mailing list