Commit Graph

5140 Commits (2a2ebab1fa73e6a8cd25d8d70a77f0cd4743a5cb)

Author SHA1 Message Date
SaitTalhaNisanci 2a2ebab1fa Add tests for jsonb subscripting (#5232)
PG commit: 676887a3b0b8e3c0348ac3f82ab0d16e9a24bd43
2021-09-03 15:44:28 +03:00
Ahmet Gedemenli 2b263f9a2a ALTER STATISTICS .. OWNER TO CURRENT_ROLE (#5225)
(cherry picked from commit 42322caf90ca094777aa01376e02d1187afc1560)
2021-09-03 15:44:28 +03:00
Onder Kalaci 82a3b20fb3 Fix flaky test 2021-09-03 15:44:28 +03:00
Onder Kalaci 5844ab286c Support OUT parameters in procedure pushdown delegation
In PG 14, procedures can have OUT parameters. In Citus' procedure
delegation framework, we need to adjust the function expression
to get the outargs parameters.

Releven PG change:
e56bce5d43
2021-09-03 15:44:28 +03:00
Ahmet Gedemenli 1ff7186d20 Extended statistics on expressions - PG14 a4d75c8 (#5224)
(cherry picked from commit 1268415f123b5d99cfacfe207c8670240efc1c00)
2021-09-03 15:44:28 +03:00
Halil Ozan Akgul 113d5d6615 Adds support for column compression in table distribution 2021-09-03 15:44:28 +03:00
Ahmet Gedemenli 6fbdeb38a8 ALTER TABLE ... DETACH PARTITION ... CONCURRENTLY - PG14 #71f4c8c (#5223) 2021-09-03 15:44:28 +03:00
Onder Kalaci c431bb2e45 Add support for "COPY dist/ref tables FROM" progress report
Simply call Postgres' function to report the progress on
each row recieved.

Note that we currently do not support "COPY dist/ref TO .." progress
report nicely. Citus has some specialized logic to support
"COPY dist/ref TO .." such that it either converts the underlying
command into "COPY (SELECT * FROM dist/ref ) ..." or sends COPY
command to shards directly. In the former case, "tuples_processed"
is only updated when the executor returns all the tuples, so the
progress is not accurate. In the latter case, Citus can actually
implement the progress report. But, for the sake of consistency,
we prefer to not implement at all.

Added to PG 14 with https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=8a4f618e7ae3cb11b0b37d0f06f05c8ff905833f
2021-09-03 15:44:28 +03:00
Ahmet Gedemenli 66303785f3 Add option PROCESS_TOAST to VACUUM - PG14 #7cb3048 (#5219)
(cherry picked from commit e63bdfc49f9203db14ef77313c1d5e3461a84a32)
2021-09-03 15:44:28 +03:00
Sait Talha Nisanci 35a3f7240d CHANGELOG: Allow REINDEX to change the tablespace of the new index 2021-09-03 15:44:28 +03:00
Sait Talha Nisanci 4e85d9ffce Add empty pg14 sql file 2021-09-03 15:44:28 +03:00
Sait Talha Nisanci 307eb81278 Fix failure for 1pc_copy_hash 2021-09-03 15:41:28 +03:00
Nils Dijk c799d8cad8 add 14beta3 to CI 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci a6c40ebd14 Fix multi_follower_dml
When the_table is emtpy, we don't get an error with pg14 anymore so we
replace it generate_series so that we get the error.
2021-09-03 15:41:28 +03:00
Sait Talha Nisanci bd501b4d80 Enable pg12-pg14 upgrade test 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci b16dadbe7c Avoid NOTICE message to avoid an alternative output with pg14 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 6ff609fa86 Add alternative output for data_types
It seems like there is a problem with Postgres14 with SELECT DISTINCT
COUNT. The issue is reported to Postgres and an alternative output is
added. We can remove the alternative output when the issue is fixed on
PG. If this is not an issue on PG(which is unlikely) we should consider
some other solution.
2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 2fa1e5ffe3 Use the default max_parallel_workers_per_gather for vanilla 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 4b951a2ed9 Add alternative output for multi-mx 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 96964aeee5 Turn off debug for one query to avoid adding an alternative output 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci e7607b6bed Add a helper function to check explain has a single task
In order to avoid adding an alternative output, a function to check if a
given explan plan has a single task added. This doesn't change what the
changed tests intend to do.
2021-09-03 15:41:28 +03:00
Sait Talha Nisanci e0faf34417 turn off costs in columnar_indexes explain query 2021-09-03 15:41:28 +03:00
Nils Dijk e63302d012 update error messages for libpq 14beta3 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 2656d885f9 Rewrite AppendColumnNames for Pg14
Postgres changed stats expression types as of PG14. Hence we needed to
write the AppendColumnNames method. Also they removed the error on PG
side so we remove it as well.

Relevant commits on pg14:
a4d75c86bf15220df22de0a92c819ecef9db3849
388e75ad33489b77cfb9a8590a91e9287d8fb960
2021-09-03 15:41:28 +03:00
Sait Talha Nisanci d1c0403055 Disable Query Idenfifier calculation in tests
When queryId is not 0 and verbose is true, the query identifier is
emitted to the explain output. This is breaking Postgres outputs.
We disable de query identifier calculation in the tests.
Commit on PG that introduced the query identifier in the explain output:
4f0b0966c866ae9f0e15d7cc73ccf7ce4e1af84b
2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 7c0389a7a1 Update propagate extension commands test for pg12
The test file was changes slightly to avoid adding an alternative
output. We update the existing alternative output for pg12 with the new
changes.
2021-09-03 15:41:28 +03:00
Sait Talha Nisanci cd402b6a2b Add alternative output for pg12 for window_functions 2021-09-03 15:41:28 +03:00
Halil Ozan Akgul c31b0c2652 Sets next_shard_id at partition_wise_join test 2021-09-03 15:41:28 +03:00
Halil Ozan Akgul 9fc4c27b08 Readds deleted resultRelInfo changes for previos PG versions
These changes were removed in commit: Introduces ExecSimpleRelationInsert_compat and modifyStateResultRelInfo macros
We shouldn't have removed them but instead kept them for before PG14
2021-09-03 15:41:28 +03:00
Nils Dijk b632dd9940 use pg14 image for pg upgrade tests 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci aca2b8b675 Add alternative output for isolation_master_update_node 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci f3fa133caa Bind seg version to 1.3 in isolation_textension_commands 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 75fff14792 Turn off VERBOSE to avoid alternative output
With VERBOSE option, as of PG14, we get a line with "Query Identifier".
2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 6b65dbc492 Add partition_wise_join to avoid big alternative output
There was a small part in multi_partitioning that would need an
alternative output for pg14. Instead of adding an alternative for the
whole file, we created a new file, called partition_wise_join.sql and
added the alternative output for that.
2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 375a1adc9e Check if extversion is the same for seg extension
When we check the exact version of the seg extension, it becomes a
problem when its version changes, such as from 1.3 to 1.4. So now we
modified the changes to check for that the version is the same in all
the cluster.
2021-09-03 15:41:28 +03:00
Halil Ozan Akgul ca0d4c3bde Includes pg_version_constants.h in columnar_version_compat.h 2021-09-03 15:41:28 +03:00
Halil Ozan Akgul 7823e49219 Introduces pg_get_statisticsobj_worker_compat macro
Relevant PG commit:
a4d75c86bf15220df22de0a92c819ecef9db3849
2021-09-03 15:41:28 +03:00
Halil Ozan Akgul f16d5e1833 Introduces make_simple_restrictinfo_compat and pull_varnos_compat macros
make_simple_restrictinfo and pull_varnos functions now have a new parameter
These new macros give us the ability to use this new parameter for PG14 and they don't give the parameter for previous versions

Relevant PG commit:
55dc86eca70b1dc18a79c141b3567efed910329d
2021-09-03 15:41:28 +03:00
Nils Dijk 79d1b7d50b add 14beta3 to CI 2021-09-03 15:41:28 +03:00
Halil Ozan Akgul 9b6ce10892 Removes password outputs from alter_role_propagation tests 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 20c32a7a1d Add alternative output for multi_deparse_function
Postgres tightened up its checks for invalid GUC names hence we started
to get an alternative output for one of our tests. We add an alternative
output since the file is relatively small.

Commit on PG:
3db826bd55cd1df0dd8c3d811f8e5b936d7ba1e4
2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 256e7d1540 Add alternative output for window_functions 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci df9b7149c3 Add some normalization rules for pg14 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci dc81cae18f Turn off COSTS to avoid alternative output for pg14 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci fb8671f291 Change pg13 test to not differ with pg14 to avoid adding alternative output 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 3f5c178c93 Remove VERBOSE output to make pg14 and pg13 output the same 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci abd3c1089b Use oid_hash in write state management 2021-09-03 15:41:28 +03:00
Halil Ozan Akgul 8ef94dc1f5 Changes array_cat argument type from anyarray to anycompatiblearray
Relevant PG commit:
9e38c2bb5093ceb0c04d6315ccd8975bd17add66

fix array_cat_agg for pg upgrades

array_cat_agg now needs to take anycompatiblearray instead of anyarray
because array_cat changed its type from anyarray to anycompatiblearray
with pg14.

To handle upgrades correctly, we drop the aggregate in
citus_pg_prepare_upgrade. To be able to drop it, we first remove the
dependency from pg_depend.

Then we create the right aggregate in citus_finish_pg_upgrade and we
also add the dependency back to pg_depend.
2021-09-03 15:41:28 +03:00
Sait Talha Nisanci a1bfb4f31b Fix unlimited copy size variable's value 2021-09-03 15:41:28 +03:00
Sait Talha Nisanci 29f5b99951 Use empty string instead of NULL for queryString
Postgres doesn't accept NULL for queryStrings in explain plans anymore.
Internally, there are some places in Postgres where they modified the
NULLS to ""(the empty string). So we do the same on citus side.

Commit on Postgres:
1111b2668d89bfcb6f502789158b1233ab4217a6
2021-09-03 15:27:25 +03:00