postgresql/src/bin/pg_upgrade
Michael Paquier b6dac98b05 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:29 +09:00
..
po Translation updates 2021-11-08 10:06:30 +01:00
.gitignore Remove analyze_new_cluster script from pg_upgrade 2020-11-09 12:15:48 +01:00
check.c pg_upgrade: warn about extensions that need updating 2021-08-03 11:58:15 -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 Revert per-index collation version tracking feature. 2021-05-07 21:10:11 +12:00
exec.c Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
file.c Split macros from visibilitymap.h into a separate header 2021-09-23 19:59:11 +03:00
function.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
IMPLEMENTATION Fix wording in pg_upgrade docs 2017-05-05 12:42:21 +02:00
info.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
Makefile Remove analyze_new_cluster script from pg_upgrade 2020-11-09 12:15:48 +01:00
nls.mk Translation updates 2021-05-10 14:36:21 +02:00
option.c Revert per-index collation version tracking feature. 2021-05-07 21:10:11 +12:00
parallel.c Factor out system call names from error messages 2021-04-23 14:21:37 +02: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:15 -04:00
relfilenode.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
server.c Avoid redundantly prefixing PQerrorMessage for a connection failure. 2021-01-22 16:52:31 -05:00
tablespace.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
test.sh Move into separate file all the SQL queries used in pg_upgrade tests 2021-12-02 10:31:29 +09:00
TESTING Update stale comments, and fix comment typos. 2019-06-08 10:12:26 -07:00
upgrade_adapt.sql Move into separate file all the SQL queries used in pg_upgrade tests 2021-12-02 10:31:29 +09:00
util.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
version.c C comment: correct heading of extension query 2021-08-03 12:26:08 -04:00