When creating a CAgg using a column on the projection that is not part
of the `GROUP BY` clause but is functionally dependent of the primary
key of the referenced table is leading to a problem in dump/restore
because the wrong dependencies created changing the order and way dump
is generated.
Fixed it by copying the `Query` data structure of the `direct view` and
changing the necessary properties instead of creating it from scratch.
It's long we need to have binary upgrade tests in our CI. One example
is #6935 (and others) that can be prevented if we have such kind of
test in our CI.
To implement the `pg_upgrade` test we used the python Testing Framework
for PostgreSQL (https://github.com/postgrespro/testgres).
Unfortunately the testing framework don't have the ability to retain the
pg_upgrade log files after a successful execution, then we created a PR
to make it possible and we'll use this patched version until we get the
code merged and released on upstream.
https://github.com/postgrespro/testgres/pull/125Closes#3868#4428