Honour TEMP_CONFIG when testing pg_upgrade
authorAndrew Dunstan <andrew@dunslane.net>
Thu, 17 Sep 2015 15:57:00 +0000 (11:57 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Thu, 17 Sep 2015 15:57:00 +0000 (11:57 -0400)
This setting contains extra configuration for the temp instance, as used
in pg_regress' --temp-config flag.

Backpatch to 9.2 where test.sh was introduced.

src/bin/pg_upgrade/test.sh

index ec3a7ed96a75423c1de34bf531123d45b874b570..aa7f3994caa6bcfc64b0a24f875da40135b1ec05 100644 (file)
@@ -21,6 +21,10 @@ unset MAKELEVEL
 # authentication configuration.
 standard_initdb() {
    "$1" -N
+   if [ -n "$TEMP_CONFIG" -a -r "$TEMP_CONFIG" ]
+   then
+       cat "$TEMP_CONFIG" >> "$PGDATA/postgresql.conf"
+   fi
    ../../test/regress/pg_regress --config-auth "$PGDATA"
 }