[Pkg-postgresql-public] Bug#886871: postgresql-common: perl error in pg_createcluster

Mark Eichin eichin at thok.org
Wed Jan 10 18:55:11 UTC 2018


Package: postgresql-common
Version: 189

While diagnosing an unrelated problem with pg_upgradecluster, got the
"Configuring already existing cluster" message and chased down the code
to this, starting at line 351:

    if ($existingver = $version) {
        print "Configuring already existing cluster (configuration: $confdir, data: $datadir, owner: $owneruid:$ownergid)\n";
    } else {

Perl, like C, allows assignments in expressions; also like C, this is
often incorrect/unintended code, as it is in this case.  (The preceding
lines set $existingver and it is obviously intended that they be
compared, not overwritten without ever examining the value; this isn't
subtle, it's just that you probably don't see this message unless
something *else* has already gone wrong, which is why it appears to have
been present since 2008.)

(Version 189 in sid is the newest version I could easily find to report
against.)



More information about the Pkg-postgresql-public mailing list