Commit Graph

5113 Commits (795a46f04c87d084e66716d6993b29e063dc2003)

Author SHA1 Message Date
Sait Talha Nisanci 795a46f04c Avoid NOTICE message to avoid an alternative output with pg14 2021-08-25 16:53:56 +03:00
Sait Talha Nisanci 76084f231b 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-08-25 16:53:56 +03:00
Sait Talha Nisanci 37ef8b4168 Use the default max_parallel_workers_per_gather for vanilla 2021-08-25 16:53:56 +03:00
Sait Talha Nisanci a3f11ac10c Add alternative output for multi-mx 2021-08-25 16:53:56 +03:00
Sait Talha Nisanci 9d35519ab8 Turn off debug for one query to avoid adding an alternative output 2021-08-25 16:53:56 +03:00
Sait Talha Nisanci 43df276ed9 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-08-25 16:53:56 +03:00
Sait Talha Nisanci 0436b56c1c turn off costs in columnar_indexes explain query 2021-08-25 16:53:56 +03:00
Sait Talha Nisanci bcc254be92 Get partition column via updatedCols 2021-08-25 16:53:56 +03:00
Nils Dijk 183577fd24 update error messages for libpq 14beta3 2021-08-25 16:53:56 +03:00
Sait Talha Nisanci 5173592c1d Disable queryId calculation in our test suite
With pg_stat_statements queryId is calculated by default now but that
puts an extra line to explain outputs with Query Identifier. To avoid
that, we explicitly turn off this setting.

Commit on PG:
cafde58b337e007cb6a719f5ab4dd6459d932a39
2021-08-25 16:52:07 +03:00
Sait Talha Nisanci d121c4bea4 normalize array_cat_agg output 2021-08-25 16:52:07 +03:00
Sait Talha Nisanci 3d27258b79 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-08-25 16:52:07 +03:00
Sait Talha Nisanci 9f8568c585 Reset queryId to 0 for Explain queries
When queryId is not 0 and verbose is true, the query identifier is
emitted to the explain output. This is breaking Postgres outputs.
There might be a reason we process postgres tables for explain but
ideally if the explain doesn't contain any citus table, we should just
let Postgres handle it.

Commit on PG that introduced the query identifier in the explain output:
4f0b0966c866ae9f0e15d7cc73ccf7ce4e1af84b
2021-08-25 16:52:07 +03:00
Sait Talha Nisanci b1cbfa6610 Use pg12.6 and pg13.2 2021-08-25 16:52:07 +03:00
Sait Talha Nisanci bd2c3d4c60 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-08-25 16:51:13 +03:00
Sait Talha Nisanci 98087fa6fc Add alternative output for pg12 for window_functions 2021-08-25 16:51:13 +03:00
Halil Ozan Akgul 4113691ab2 Sets next_shard_id at partition_wise_join test 2021-08-25 16:51:13 +03:00
Halil Ozan Akgul 7961343ed2 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-08-25 16:51:13 +03:00
Nils Dijk 6650aeadb8 use pg14 image for pg upgrade tests 2021-08-25 16:51:13 +03:00
Sait Talha Nisanci 910777cd1e Add alternative output for isolation_master_update_node 2021-08-25 16:50:43 +03:00
Sait Talha Nisanci 118a218243 Bind seg version to 1.3 in isolation_textension_commands 2021-08-25 16:50:23 +03:00
Sait Talha Nisanci 0cf51d7e4d Turn off VERBOSE to avoid alternative output
With VERBOSE option, as of PG14, we get a line with "Query Identifier".
2021-08-25 16:50:01 +03:00
Sait Talha Nisanci 0604725d53 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-08-25 16:50:01 +03:00
Sait Talha Nisanci 365c5a5221 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-08-25 16:50:01 +03:00
Halil Ozan Akgul b150ec6676 Includes pg_version_constants.h in columnar_version_compat.h 2021-08-25 16:50:01 +03:00
Halil Ozan Akgul 3b607ed034 Puts usage of HASH_STRINGS in PG14 version check 2021-08-25 16:50:01 +03:00
Halil Ozan Akgul 5d01cecaf5 Introduces pg_get_statisticsobj_worker_compat macro
Relevant PG commit:
a4d75c86bf15220df22de0a92c819ecef9db3849
2021-08-25 16:50:01 +03:00
Halil Ozan Akgul eff273c0a3 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-08-25 16:50:01 +03:00
Nils Dijk 0274219215 add missing define with old value 2021-08-25 16:50:01 +03:00
Nils Dijk 56237aec11 add 14beta3 to CI 2021-08-25 16:50:01 +03:00
Halil Ozan Akgul 3fc6c415dd Removes password outputs from alter_role_propagation tests 2021-08-25 16:48:06 +03:00
Sait Talha Nisanci dd9848aeea 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-08-25 16:48:06 +03:00
Sait Talha Nisanci 29aecaff91 Add shard relation to pState in localCopy
CopyFrom expects an AccessShareLock on the table. Instead of adding an
explicit lock, we do it how postgres is doing, which is to use
addRangeTableEntryForRelation.

Commit:
c532d15dddff14b01fe9ef1d465013cb8ef186df
2021-08-25 16:48:06 +03:00
Sait Talha Nisanci 0e3ebced29 Add alternative output for window_functions 2021-08-25 16:48:06 +03:00
Sait Talha Nisanci c93f4f5620 Add some normalization rules for pg14 2021-08-25 16:48:06 +03:00
Sait Talha Nisanci 25421ddedc Turn off COSTS to avoid alternative output for pg14 2021-08-25 16:48:06 +03:00
Sait Talha Nisanci 198f95b25c Change pg13 test to not differ with pg14 to avoid adding alternative output 2021-08-25 16:48:06 +03:00
Sait Talha Nisanci 1230745f6d Remove VERBOSE output to make pg14 and pg13 output the same 2021-08-25 16:48:06 +03:00
Sait Talha Nisanci b410887de1 Use rte->updatedCols to determine if partition column exists
Use rte->updatedCols to determine if partition column exists in the
target list in case of UPDATE.

Commit on PG:
86dc90056dfdbd9d1b891718d2e5614e3e432f35
2021-08-25 16:48:06 +03:00
Sait Talha Nisanci 721a7fb9be Use oid_hash in write state management 2021-08-25 16:48:05 +03:00
Halil Ozan Akgul c660356649 Changes array_cat argument type from anyarray to anycompatiblearray
Relevant PG commit:
9e38c2bb5093ceb0c04d6315ccd8975bd17add66
2021-08-25 16:48:05 +03:00
Sait Talha Nisanci 4148c6d1f2 Fix unlimited copy size variable's value 2021-08-25 16:48:05 +03:00
Sait Talha Nisanci c25f412a70 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-08-25 16:48:05 +03:00
Sait Talha Nisanci e92c915842 Use HASH_STRINGS explicitly in hash functions
Postgres expects to set the HASH_STRINGS explicitly in case of the
default behaivor for string hash function.

Postgres Commit
b3817f5f774663d55931dd4fab9c5a94a15ae7ab
2021-08-25 16:48:05 +03:00
Halil Ozan Akgul 5161f4f0fa Renames shadowing ruleutils_14.c variables 2021-08-25 16:48:05 +03:00
Halil Ozan Akgul 1ba3a77ef1 Introduces index_insert_compat macro
index_insert function now has a new parameter, indexUnchanged
This new macro give us the ability to use these new parameter for PG14 and they don't give the parameters for previous versions
Existing parameter is set to false

Relevant PG commit:
9dc718bdf2b1a574481a45624d42b674332e2903
2021-08-25 16:48:05 +03:00
Halil Ozan Akgul b86ac4f2a3 Introduces ExecSimpleRelationInsert_compat and modifyStateResultRelInfo macros
es_result_relation_info is removed from Estate. In this commit we make some changes to handle that.
resultRelationInfo filed is added to ModifyState to support the removed field.

Relevant PG commits:
1375422c7826a2bf387be29895e961614f69de4b
a04daa97a4339c38e304cd6164d37da540d665a8
2021-08-25 16:48:05 +03:00
Halil Ozan Akgul 92a4f5e5ad Introduces GetOldestNonRemovableTransactionId_compat macro
GetOldestXmin function is removed so we use GetOldestNonRemovableTransactionId functions instead
GetOldestNonRemovableTransactionId_compat picks the appropriate one

Relevant PG commit:
dc7420c2c9274a283779ec19718d2d16323640c0
2021-08-25 16:48:05 +03:00
Halil Ozan Akgul 2d97bbc25a Introduces get_partition_parent_compat and RelationGetPartitionDesc_compat macros
get_partition_parent and RelationGetPartitionDesc functions now have new parameters to also include detached partitions
Thess new macros give us the ability to use these new parameter for PG14 and they don't give the parameters for previous versions
Existing parameters are set to not accept detached partitions

Relevant PG commit:
71f4c8c6f74ba021e55d35b1128d22fb8c6e1629
2021-08-25 16:48:05 +03:00
Halil Ozan Akgul 68f896ac0f Introduces proc_statusflags_compat macro
In two commits vacuumFlags in PGXACT is moved and then renamed to status flags
This macro uses the appropriate version of the flag

Relevant PG commits:
5788e258bb26495fab65ff3aa486268d1c50b123
cd9c1b3e197a9b53b840dcc87eb41b04d601a5f9
2021-08-25 16:48:05 +03:00