Re: pg_upgrade: Make testing different transfer modes easier

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2022-12-07T16:33:06Z
Lists: pgsql-hackers
On 02.12.22 13:04, Daniel Gustafsson wrote:
> Wouldn't it be possible, and less change-code-manual, to accept this via an
> extension to PROVE_FLAGS?  Any options after :: to prove are passed to the
> test(s) [0] so we could perhaps inspect @ARGV for the mode if we invent a new
> way to pass arguments.  Something along the lines of the untested sketch
> below in the pg_upgrade test:
> 
> +# Optionally set the file transfer mode for the tests via arguments to PROVE
> +my $mode = (@ARGV);
> +$mode = '--copy' unless defined;
> 
> .. together with an extension to Makefile.global.in ..
> 
> -   $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
> +   $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl) $(PROVE_TEST_ARGS)
> 
> .. should *I think* allow for passing the mode to the tests via:
> 
> make -C src/bin/pg_upgrade check PROVE_TEST_ARGS=":: --link"

I think this might be a lot of complication to get working robustly and 
in the different build systems.  Plus, what happens if you run all the 
test suites and want to pass some options to pg_upgrade and some to 
another test?

I think if we want to make this configurable on the fly, and environment 
variable would be much easier, like

     my $mode = $ENV{PG_TEST_PG_UPGRADE_MODE} || '--copy';




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. pg_upgrade: Add --copy option

  2. pg_upgrade: Make testing different transfer modes easier