pg_upgrade: Make testing different transfer modes easier

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_upgrade: Make testing different transfer modes easier
Date: 2022-12-01 15:18:21
Message-ID: 50a97009-8ff9-ca4d-a0f6-6086a6775a5b@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wanted to test the different pg_upgrade transfer modes (--link,
--clone), but that was not that easy, because there is more than one
place in the test script you have to find and manually change. So I
wrote a little patch to make that easier. It's still manual, but it's a
start. (In principle, we could automatically run the tests with each
supported mode in a loop, but that would be very slow.)

While doing that, I also found it strange that the default transfer mode
(referred to as "copy" internally) did not have any external
representation, so it is awkward to refer to it in text, and obscure to
see where it is used for example in those test scripts. So I added an
option --copy, which effectively does nothing, but it's not uncommon to
have options that select default behaviors explicitly. (I also thought
about something like a "mode" option with an argument, but given that we
already have --link and --clone, this seemed the most sensible.)

Thoughts?

Attachment Content-Type Size
0001-pg_upgrade-Add-copy-option.patch text/plain 2.6 KB
0002-pg_upgrade-Make-testing-different-transfer-modes-eas.patch text/plain 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2022-12-01 15:48:04 Re: New docs chapter on Transaction Management and related changes
Previous Message Peter Eisentraut 2022-12-01 15:10:39 Re: File API cleanup