postgresql/src/bin/pg_upgrade
Michael Paquier 0e603b75c4 Move into separate file all the SQL queries used in pg_upgrade tests
The existing pg_upgrade/test.sh and the buildfarm code have been holding
the same set of SQL queries when doing cross-version upgrade tests to
adapt the objects created by the regression tests before the upgrade
(mostly, incompatible or non-existing objects need to be dropped from
the origin, perhaps re-created).

This moves all those SQL queries into a new, separate, file with a set
of \if clauses to handle the version checks depending on the old version
of the cluster to-be-upgraded.

The long-term plan is to make the buildfarm code re-use this new SQL
file, so as committers are able to fix any compatibility issues in the
tests of pg_upgrade with a refresh of the core code, without having to
poke at the buildfarm client.  Note that this is only able to handle the
main regression test suite, and that nothing is done yet for contrib
modules yet (these have more issues like their database names).

A backpatch down to 10 is done, adapting the version checks as this
script needs to be only backward-compatible, so as it becomes possible
to clean up a maximum amount of code within the buildfarm client.

Author: Justin Pryzby, Michael Paquier
Discussion: https://postgr.es/m/20201206180248.GI24052@telsasoft.com
Backpatch-through: 10
2021-12-02 10:31:43 +09:00
..
po Translation updates 2021-11-08 10:09:20 +01:00
.gitignore Ignore file generated during pg_upgrade testing 2018-04-30 12:39:29 -04:00
check.c pg_upgrade: warn about extensions that need updating 2021-08-03 11:58:14 -04:00
controldata.c pg_resetxlog: add option to set oldest xid & use by pg_upgrade 2021-07-26 22:38:14 -04:00
dump.c Ensure that all temp files made during pg_upgrade are non-world-readable. 2018-02-05 10:58:27 -05:00
exec.c pg_upgrade; change major version comparisons to use <=, not < 2020-10-06 12:12:09 -04:00
file.c Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:13 -04:00
function.c pg_upgrade; change major version comparisons to use <=, not < 2020-10-06 12:12:09 -04:00
IMPLEMENTATION Fix wording in pg_upgrade docs 2017-05-05 12:42:21 +02:00
info.c Switch client-side code to include catalog/pg_foo_d.h not pg_foo.h. 2018-04-08 13:59:52 -04:00
Makefile Have pg_upgrade's Makefile honor NO_TEMP_INSTALL 2019-03-31 08:21:43 -04:00
nls.mk Translation updates 2019-11-11 10:50:22 +01:00
option.c Document the pg_upgrade -j/--jobs option as taking an argument 2020-02-11 23:55:50 +01:00
parallel.c Make error handling in parallel pg_upgrade less bogus. 2018-12-16 14:51:47 -05:00
pg_upgrade.c pg_resetxlog: add option to set oldest xid & use by pg_upgrade 2021-07-26 22:38:14 -04:00
pg_upgrade.h pg_upgrade: warn about extensions that need updating 2021-08-03 11:58:14 -04:00
relfilenode.c pg_upgrade: remove pre-8.4 code and >= 8.4 check 2020-10-06 14:31:21 -04:00
server.c pg_upgrade; change major version comparisons to use <=, not < 2020-10-06 12:12:09 -04:00
tablespace.c Fix misc typos, mostly in comments. 2018-07-18 16:17:42 +03:00
test.sh Move into separate file all the SQL queries used in pg_upgrade tests 2021-12-02 10:31:43 +09:00
TESTING Fix bit-rot in pg_upgrade's test.sh, and improve documentation. 2017-06-08 13:48:39 -04:00
upgrade_adapt.sql Move into separate file all the SQL queries used in pg_upgrade tests 2021-12-02 10:31:43 +09:00
util.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
version.c C comment: correct heading of extension query 2021-08-03 12:26:08 -04:00