Commit Graph

2013 Commits (a7bcc822f1a10e400af738bc8b316c19a2040c3a)

Author SHA1 Message Date
Sait Talha Nisanci e640c5d509 CHANGELOG: Allow REINDEX to change the tablespace of the new index 2021-08-27 10:26:57 +03:00
Sait Talha Nisanci 163d4b6864 Add empty pg14 sql file 2021-08-26 09:44:21 +03:00
Sait Talha Nisanci 23131a52cd Fix style 2021-08-25 17:17:16 +03:00
Sait Talha Nisanci 42e41900b3 Add alternative output for pg14 in check-failure 2021-08-25 17:15:57 +03:00
Sait Talha Nisanci 409132a374 Fix failure for 1pc_copy_hash 2021-08-25 17:05:59 +03:00
Sait Talha Nisanci 2ba32b3922 Add an alternative output for multi_follower_dml
It seems like the change in multi_follower_dml is about a local table
hence it suggests that this is probably related to postgres side, and
safe to add an alternative output for.
2021-08-25 16:25:21 +03:00
Sait Talha Nisanci b6bd3c2d81 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-08-25 16:25:21 +03:00
Sait Talha Nisanci 98fda426f5 Avoid NOTICE message to avoid an alternative output with pg14 2021-08-25 16:25:20 +03:00
Sait Talha Nisanci 7a657e05f5 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:25:20 +03:00
Sait Talha Nisanci cd18c5be4a Use the default max_parallel_workers_per_gather for vanilla 2021-08-25 16:25:20 +03:00
Sait Talha Nisanci a6fb1e5f54 Add alternative output for multi-mx 2021-08-25 16:25:20 +03:00
Sait Talha Nisanci 46bef9e39c Turn off debug for one query to avoid adding an alternative output 2021-08-25 16:25:20 +03:00
Sait Talha Nisanci d9e25dd236 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:25:20 +03:00
Sait Talha Nisanci 00687d7ceb turn off costs in columnar_indexes explain query 2021-08-25 16:25:20 +03:00
Nils Dijk 75a0bc5755 update error messages for libpq 14beta3 2021-08-25 16:25:20 +03:00
Sait Talha Nisanci f46b7fe70e 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:24:43 +03:00
Sait Talha Nisanci 6ce3bd94b5 normalize array_cat_agg output 2021-08-25 16:24:43 +03:00
Sait Talha Nisanci 327adfc53f 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:24:43 +03:00
Sait Talha Nisanci ed82affce5 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:23:40 +03:00
Sait Talha Nisanci b57e6be724 Add alternative output for pg12 for window_functions 2021-08-25 16:23:40 +03:00
Halil Ozan Akgul 5bd78de486 Sets next_shard_id at partition_wise_join test 2021-08-25 16:23:40 +03:00
Sait Talha Nisanci 12b5d81b2c Add alternative output for isolation_master_update_node 2021-08-25 16:23:04 +03:00
Sait Talha Nisanci 828d2e1339 Bind seg version to 1.3 in isolation_textension_commands 2021-08-25 16:22:26 +03:00
Sait Talha Nisanci 74e8bc5b2e Turn off VERBOSE to avoid alternative output
With VERBOSE option, as of PG14, we get a line with "Query Identifier".
2021-08-25 16:20:19 +03:00
Sait Talha Nisanci efc5a8f0bd 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:20:19 +03:00
Sait Talha Nisanci 7edc5cf819 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:20:19 +03:00
Halil Ozan Akgul 99e7baeb49 Removes password outputs from alter_role_propagation tests 2021-08-25 16:18:33 +03:00
Sait Talha Nisanci e56e9cc1e7 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:18:33 +03:00
Sait Talha Nisanci 3a64b552b9 Add alternative output for window_functions 2021-08-25 16:18:32 +03:00
Sait Talha Nisanci d09227d52e Add some normalization rules for pg14 2021-08-25 16:18:32 +03:00
Sait Talha Nisanci 44f7e07530 Turn off COSTS to avoid alternative output for pg14 2021-08-25 16:18:32 +03:00
Sait Talha Nisanci 65814b503e Change pg13 test to not differ with pg14 to avoid adding alternative output 2021-08-25 16:18:32 +03:00
Sait Talha Nisanci 1171a4a3b6 Remove VERBOSE output to make pg14 and pg13 output the same 2021-08-25 16:18:32 +03:00
SaitTalhaNisanci b923d51fc6
Bump pg12 and pg13 images to pg12.8 and pg13.8 (#5208)
In our testing infra structure, even though we use pinned versions of postgres, the auxiliary libraries might pull in newer versions. This is for example the case for libpq, which will now use the libpq libraries from 14beta3.

The changes in this PR are a lot due to the libpq changes.

We also have changed the citus version that is used as a base for the citus upgrades, from 10.0 to 10.1 . This caused columnar to enforce some extra limits on the settings, which conflicted with our upgrade tests.

The changes in failure tests are due to the libpq changes.

There are also a lot of changes on isolation tests outputs, hence we
updated all of them.

Co-authored-by: Nils Dijk <nils@citusdata.com>
2021-08-25 16:04:57 +03:00
Onur Tirtir 5af839ada0
Not print metapage.reserved_offset in regression tests (#5168)
* We were anyway not testing reserved_offset in any of those tests
   but other fields.

* This only happens with compressed columnar tables and is because the
   libzstd/liblz4 versions that we have on exttester ci image might be different
   than what we might have on our local environments.
2021-08-23 11:07:10 +03:00
jeff-davis 4f213f293e
Columnar: use generate_series for test rather than load. (#5181) 2021-08-16 16:12:06 -07:00
Onur Tirtir 68f46c5dc9 Use scan context for intermediate mem allocs too 2021-08-16 11:06:03 +03:00
Burak Velioglu 4355ba0a38
Add CREATE INDEX ... ON ONLY and ALTER INDEX ... ATTACH PARTITION (#4938 #4980)
- Add support for CRETE INDEX ... ON ONLY: Before that commit we were not sending "ONLY" option to the worker nodes at all. With this commit, "ONLY" parameter will be sent to the worker nodes if it is necessary. (#4938)

- Add support for ALTER INDEX ... ATTACH PARTITION: Attach child_index to parent_index by creating same inheritance on shard level in addition to table level. (#4980)
2021-08-13 13:12:45 +03:00
Ahmet Gedemenli 9e90894f21
Synchronize hasmetadata flag on mx workers (#5086)
* Synchronize hasmetadata flag on mx workers

* Switch to sequential execution

* Add test

* Use SetWorkerColumn

* Add test for stop_sync

* Remove usage of UpdateHasmetadataOnWorkersWithMetadata

* Remove MarkNodeMetadataSynced

* Fix test for metadatasynced

* Remove MarkNodeMetadataSynced

* Style

* Remove MarkNodeHasMetadata

* Remove UpdateDistNodeBoolAttr

* Refactor SetWorkerColumn

* Use SetWorkerColumnLocalOnly when setting up dependencies

* Use SetWorkerColumnLocalOnly in TriggerSyncMetadataToPrimaryNodes

* Style

* Make update command generator functions static

* Set metadatasynced before syncing

* Call SetWorkerColumn only if the sync is successful

* Try to sync all nodes

* Fix indexno

* Update metadatasynced locally first

* Break if a node fails to sync metadata

* Send worker commands optional

* Style & Rebase

* Add raiseOnError param to SetWorkerColumn

* Style

* Set metadatasynced for all metadata nodes

* Style

* Introduce SetWorkerColumnOptional

* Polish

* Style

* Dont send set command to not synced metadata nodes

* Style

* Polish

* Add test for stop_sync

* Add test for shouldhaveshards

* Add test for isactive flag

* Sort by placementid in the function verify_metadata

* Cover edge cases for failing nodes

* Add comments

* Add nodeport to isactive test

* Add warning if metadata out of sync

* Update warning message
2021-08-12 14:16:18 +03:00
Naisila Puka e5b32b2c3c
Acquire AccessShareLock before updating table statistics (#5155) 2021-08-12 13:58:15 +03:00
Onder Kalaci d4368ff2b3 Make sure that shouldhaveshards is synced to workers 2021-08-11 15:53:31 +02:00
Onder Kalaci 5f02d18ef8 transactional metadata sync for maintanince daemon
As we use the current user to sync the metadata to the nodes
with #5105 (and many other PRs), there is no reason that
prevents us to use the coordinated transaction for metadata syncing.

This commit also renames few functions to reflect their actual
implementation.
2021-08-09 10:34:55 +02:00
Onder Kalaci 35964c6366 Dropped columns do not diverge distribution column for partitioned tables
Before this commit, creating a partition after a DROP column
on the parent (position before dist. key) was leading to
partition to have the wrong distribution column.
2021-08-06 13:36:12 +02:00
naisila 798a7902bf Fix master_update_table_statistics scripts for 9.5 2021-08-03 18:15:56 +03:00
naisila f9fa5a3d69 Fix master_update_table_statistics scripts for 9.4 2021-08-03 18:15:56 +03:00
Onder Kalaci 482b8096e9 Introduce citus_internal_update_relation_colocation
update_distributed_table_colocation can be called by the relation
owner, and internally it updates pg_dist_partition. With this
commit, update_distributed_table_colocation uses an internal
UDF to access pg_dist_partition.

As a result, this operation can now be done by regular users
on MX.
2021-08-03 11:44:58 +02:00
Onur Tirtir 93ebbb0607 Re-cost SeqPath's as well for columnar tables 2021-08-02 11:32:25 +03:00
Onur Tirtir 297f59a70e Re-cost columnar table index paths 2021-08-02 11:16:37 +03:00
Onur Tirtir 73058d35cc Not free (stripe) chunk buffers after de-serializing
Previously, we were only using chunk group reader for sequential scan.
However, to support index scans on columnar tables, now we use very
same low level functions for index scan too.

Since those low-level functions were only used for sequential scan, it
was guaranteed that we would never read the same chunk group more than
once, so we were freeing chunk buffers after deserializing them into a
separate buffer.

Now that we use those low level functions for index scan, we cannot
free chunk buffers since it's possible to read the same chunk group
again, such that:

- read chunk group 1 of stripe 5
- read chunk group 2 of stripe 5
- read chunk group 1 of stripe 5 again

Here, when we decide to read chunk group 1 for a second time,
chunk group 1 is not cached. Plus, before this commit, we were
freeing the chunk buffers for chunk group 1 after the first
read and then we were getting segfault or errors from low-level
de-compression APIs.
2021-08-02 11:00:12 +03:00
Onur Tirtir 83f5d42365 Use long-lasting mem cxt & optimize correlated index scan 2021-08-02 11:00:12 +03:00