From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | pg_upgrade/test.sh and v9.5 |
Date: | 2022-01-22 18:37:49 |
Message-ID: | 20220122183749.GO23027@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
In fa66b6dee, Micheal fixed test.sh to work back to v11, so I suppose nobody is
trying to run it with older versions, as I was endeavored to do.
With the attached patch, I'm able to test upgrades back to v9.6.
In 9.5, there are regression diffs from CONTEXT lines from non-error messages,
which is a v9.5 change (0426f349e). The first "make check" fails before even
getting to the upgrade part:
| NOTICE: trigger_func(before_ins_stmt) called: action = INSERT, when = BEFORE, level = STATEMENT
|- CONTEXT: SQL statement "INSERT INTO main_table VALUES (NEW.a, NEW.b)"
|- PL/pgSQL function view_trigger() line 17 at SQL statement
I tried a lot of things but couldn't find one that worked. I just tried this,
which allows the "make check" to pass, but then fails due missing symbols in
libpq during the upgrade phase. Maybe I'm missing something - Tom must have
tested psql against old versions somehow before de-supporting old versions (but
maybe not like this).
| time make check -C src/bin/pg_upgrade oldsrc=`pwd`/new/95 oldbindir=`pwd`/new/95/tmp_install/usr/local/pgsql/bin with_temp_install="LD_LIBRARY_PATH=`pwd`/new/95/tmp_install/usr/local/pgsql/lib"
I tried installcheck, but then that fails because psql doesn't accept multiple
-c options (it runs the final -c command only).
| EXTRA_REGRESS_OPTS="--bindir `pwd`/new/95/tmp_install/usr/local/pgsql/bin" LD_LIBRARY_PATH=`pwd`/new/95/tmp_install/usr/local/pgsql/lib PGHOST=/tmp time make installcheck
| ...
| ============== creating database "regression" ==============
| ERROR: database "regression" does not exist
| STATEMENT: ALTER DATABASE "regression" SET lc_messages TO 'C';ALTER DATABASE "regression" SET lc_monetary TO 'C';ALTER DATABASE "regression" SET lc_numeric TO 'C';ALTER DATABASE "regression" SET lc_time TO 'C';ALTER DATABASE "regression" SET bytea_output TO 'hex';ALTER DATABASE "regression" SET timezone_abbreviations TO 'Default';
| ERROR: database "regression" does not exist
| command failed: "/home/pryzbyj/src/postgres/new/95/tmp_install/usr/local/pgsql/bin/psql" -X -c "CREATE DATABASE \"regression\" TEMPLATE=template0" -c "ALTER DATABASE \"regression\" SET lc_messages TO 'C';ALTER DATABASE \"regression\" SET lc_monetary TO 'C';ALTER DATABASE \"regression\" SET lc_numeric TO 'C';ALTER DATABASE \"regression\" SET lc_time TO 'C';ALTER DATABASE \"regression\" SET bytea_output TO 'hex';ALTER DATABASE \"regression\" SET timezone_abbreviations TO 'Default';" "postgres"
pg_regress was changed to do that recently:
commit f45dc59a38cab1d2af6baaedb79559fe2e9b3781
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Date: Wed Oct 20 18:44:37 2021 -0400
Improve pg_regress.c's infrastructure for issuing psql commands.
--
Justin
Attachment | Content-Type | Size |
---|---|---|
0001-wip-test.sh-allow-pg_upgrade-check-from-v10-and-earl.patch | text/x-diff | 4.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-01-22 18:38:04 | Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX |
Previous Message | Stephen Frost | 2022-01-22 17:28:06 | Re: How to get started with contribution |