[Pkg-postgresql-public] Bug#827469: postgresql-common: pg_upgradecluster fails to create stats temp directory

Magnus Hagander magnus at hagander.net
Thu Jun 16 13:59:40 UTC 2016


Package: postgresql-common
Version: 174
Severity: normal

When running pg_upgradecluster in pg_upgrade mode, the new cluster gets pointed to
a pg_stats_temp directory that does not exist.

When this happens, the steps of running vaucum analyze and vacuum freeze in the new
cluster prior to transfering the data over will time out on the stats collector
at least once each, which is 40 sceonds of looking like it's doing nothing at all.

Ensuring this directory is created manually before running pg_upgradecluster removes
the delay and drastically speeds up the upgrade. Obviously, this should be done by
pg_upgradecluster, as that's the tool that actually sets the value for
pg_stats_temp.

Speedup in a new cluster is in the order of going from 60 seconds to 20 seconds.
Difference will of course be smaller on a cluster with more data, but can still
be significant.



More information about the Pkg-postgresql-public mailing list