honour TEMP_CONFIG in pg_upgrade tests

Started by Andrew Dunstanover 10 years ago3 messages
#1Andrew Dunstan
andrew@dunslane.net

I propose to have the pg_upgrade test honour TEMP_CONFIG as pg_regress
(or its Makefile) does, by applying the patch below. There might be
opther places this should also be done, but this would be a start. The
motivation is to see if it stops the errors we often see on the somewhat
slow axolotl buildfarm member when checking pg_upgrade - axolotl's
TEMP_CONFIG sets up the stats temp directory on a ramdisk, as well as
turning off fsync.

This would be backpatched to 9.2.

cheers

andrew

diff --git a/src/bin/pg_upgrade/test.sh b/src/bin/pg_upgrade/test.sh
index ec3a7ed..c0dcf8b 100644
--- a/src/bin/pg_upgrade/test.sh
+++ b/src/bin/pg_upgrade/test.sh
@@ -21,6 +21,10 @@ unset MAKELEVEL
  # authentication configuration.
  standard_initdb() {
     "$1" -N
+   if [ -n "$TEMP_CONFIG" -a -f "$TEMP_CONFIG" ]
+   then
+       cat "$TEMP_CONFIG" >> "$PGDATA/postgresql.conf"
+   fi
     ../../test/regress/pg_regress --config-auth "$PGDATA"
  }

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#1)
Re: honour TEMP_CONFIG in pg_upgrade tests

Andrew Dunstan <andrew@dunslane.net> writes:

I propose to have the pg_upgrade test honour TEMP_CONFIG as pg_regress
(or its Makefile) does, by applying the patch below. There might be
opther places this should also be done, but this would be a start.

No objection to the concept, but I wonder if the -f test should
instead be a -r test (in the original place too, I guess).

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#2)
Re: honour TEMP_CONFIG in pg_upgrade tests

On 09/17/2015 09:42 AM, Tom Lane wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

I propose to have the pg_upgrade test honour TEMP_CONFIG as pg_regress
(or its Makefile) does, by applying the patch below. There might be
opther places this should also be done, but this would be a start.

No objection to the concept, but I wonder if the -f test should
instead be a -r test (in the original place too, I guess).

In the original place permissions are in effect tested in pg_regress.c.

I'll go ahead with -r.

cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers