Commit Graph

3899 Commits (ba208eae4d19e85cdfa22b527c90ace406e70bfd)

Author SHA1 Message Date
Onur Tirtir ba208eae4d
Record non-distributed table accesses in local executor (#4139) 2020-09-07 18:19:08 +03:00
Nils Dijk 959629d3f3
Merge pull request #4136 from citusdata/fix/ensure-reference-transfer-mode
expose transfer mode for ensure reference table existence
2020-09-03 16:18:17 +02:00
Nils Dijk bbf42063a7
export LookupShardTransferMode 2020-09-03 16:06:38 +02:00
Nils Dijk 6e4862c57f
expose transfermode for ensure reference table existance 2020-09-03 16:06:37 +02:00
SaitTalhaNisanci 366461ccdb
Introduce cache entry/table utilities (#4132)
Introduce table entry utility functions

Citus table cache entry utilities are introduced so that we can easily
extend existing functionality with minimum changes, specifically changes
to these functions. For example IsNonDistributedTableCacheEntry can be
extended for citus local tables without the need to scan the whole
codebase and update each relevant part.

* Introduce utility functions to find the type of tables

A table type can be a reference table, a hash/range/append distributed
table. Utility methods are created so that we don't have to worry about
how a table is considered as a reference table etc. This also makes it
easy to extend the table types.

* Add IsCitusTableType utilities

* Rename IsCacheEntryCitusTableType -> IsCitusTableTypeCacheEntry

* Change citus table types in some checks
2020-09-02 22:26:05 +03:00
Jelte Fennema f38d24f8fb
Merge pull request #4006 from citusdata/orerror-instead-of-force
Rename ForceXxx functions to to XxxOrError
2020-09-01 11:56:52 +02:00
Jelte Fennema 451ea04508 Rename ForceXxx functions to to XxxOrError
This clearer naming was suggested in https://github.com/citusdata/citus/pull/4001
2020-09-01 11:19:17 +02:00
Hanefi Onaldi b7aad903e8
Merge pull request #4117 from citusdata/delegate-reference-procedures 2020-09-01 07:46:53 +03:00
Hanefi Önaldı 024d398cd7
Allow distribution of functions that read from reference tables
create_distributed_function(function_name,
                            distribution_arg_name,
                            colocate_with text)

This UDF did not allow colocate_with parameters when there were no
disttribution_arg_name supplied. This commit changes the behaviour to
allow missing distribution_arg_name parameters when the function should
be colocated with a reference table.
2020-09-01 07:28:34 +03:00
Jelte Fennema d0f4c19f15
Add python to OSX CONTRIBUTING requirements (#4083) 2020-08-31 18:14:21 +02:00
SaitTalhaNisanci 2baf3e0bae
Fail if merge to enterprise causes compilation issues (#4027)
* check compilation of enterprise job

* test that enterprise merge job fails with compilation error

* Revert "test that enterprise merge job fails with compilation error"

This reverts commit 0eaccd58c207a4c15365186017bf47601cc95552.

* Update readme and use citus extbuilder:13beta3
2020-08-31 13:56:15 +03:00
Jelte Fennema 1c9dc80e8f
merge-enterprise script instructions to resolve outdated branches (#4073)
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
Co-authored-by: SaitTalhaNisanci <s.talhanisanci@gmail.com>
2020-08-31 11:10:32 +02:00
Önder Kalacı 983206c5e1
Hide `citus.subquery_pushdown` flag and NOTICE when enabled (#4124)
* Hide citus.subquery_pushdown flag

This flag is dangerous and could likely to let queries
return wrong results.

The flag has a very specific purpose for a very specific
data distribution and query structure. In those cases, when
the flag is set, the user can skip recursive planning altogether
*at their own risk*.

The meaning of the flag is that "I know what I'm doing such that
the query structure/data distribution is on my control, so Citus
can skip many correctness checks".

For regular users, enabling this flag is discouraged. We have to
keep the support only for backward compatibility for some users.

In addition to that, give a NOTICE to discourage new users to
use it.
2020-08-28 14:53:09 +02:00
SaitTalhaNisanci 2459ba6eca
Update docker images (#4122)
* Update and separate test images

The build image was a single one and it would contain pg11, pg12 and
pg13. Now it is separated so that we can build each pg major
independently.

Tags are used as full postgres versions so that we can know which
version we use by looking at the tag. For example exttester:11.9 would
mean we are using pg11.9.

pg11 is updated from 11.5 to 11.9.
pg12 is updated from 12rc to 12.4.

* Ignore memory usage in pg13 explain

* Use citus instead of personal repo
2020-08-26 16:23:59 +03:00
SaitTalhaNisanci f7c2af0411
Rename RemoveCoordinatorPlacement (#4125)
RemoveCoordinatorPlacement does not do what it says. It removes the
coordinator placement only if there are other placements, so it is not a
single node, and only if the coordinator has a placement.
2020-08-26 13:12:10 +03:00
Onur Tirtir 2ca8d2fb33
Update codecov orb to 1.1.1 (#4112) 2020-08-21 12:38:29 +03:00
Hanefi Onaldi f47b3a7e7d
Remove unused parameters from round robin reordering and friends (#4120) 2020-08-20 12:45:01 +03:00
SaitTalhaNisanci 20c39fae9a
Loosen the requirement to pushdown a subquery with ref tables (#4110)
AllTargetExpressionsAreColumnReferences would return false if a query
had an entry that is referencing the outer query. It seems safe to not
have this for non-distributed tables, such as reference tables. We
already have separate checks for other cases such as having limits.
2020-08-14 12:11:15 +03:00
SaitTalhaNisanci 679bf0d2b2
Create CanPushdownSubqery wrapper for better readability (#4108) 2020-08-12 17:28:20 +03:00
SaitTalhaNisanci 73ef40886b
Rename FindNodeCheckXXX functions (#4106)
FindNodeCheck is not clear about what the function is doing. They are
renamed to FindNodeMatchingCheckFunctionXXX. Also for choosing elements in these
functions, CheckNodeFunc type is introduced.
2020-08-11 15:01:23 +03:00
Hadi Moshayedi b8d826a113
Merge pull request #4068 from citusdata/explain_analyze_execute
Support EXPLAIN ANALYZE EXECUTE and EXPLAIN EXECUTE
2020-08-10 13:59:40 -07:00
Hadi Moshayedi 7b74eca22d Support EXPLAIN EXECUTE ANALYZE. 2020-08-10 13:44:30 -07:00
SaitTalhaNisanci e500779ddd
Merge pull request #4098 from citusdata/isolateTests
Isolate each test schedule
2020-08-10 15:31:00 +03:00
Sait Talha Nisanci 4cb77da9d4 Use full names in jobs for make targets 2020-08-10 15:07:05 +03:00
Sait Talha Nisanci 1de6a8e8fb Isolate each test schedule
Since we don't have any limitation on parallelism now, it makes sense to
isolate each test schedule so that:
- we can use more parallelism
- we will wait less on retries because if a job fails with multiple
schedules, we needed to rerun all of them.
2020-08-10 15:07:05 +03:00
Philip Dubé 7d5c85657e
Merge pull request #4097 from citusdata/fix-case-insensitive-test-on-old-icu
Fix non deterministic collation test to work with ancient libicu versions
2020-08-07 12:46:11 +00:00
Philip Dubé 212ae7163f Fix non deterministic collation test to work with ancient libicu versions
CentOS 7's libicu is too old for und-u-ks-level2

@colStrength=secondary works with both older & newer versions of libicu
2020-08-07 12:34:32 +00:00
Marco Slot 320a840b3f
Merge pull request #3819 from citusdata/fix/mx_multi_shard_lock 2020-08-07 12:11:18 +02:00
Hanefi Onaldi 5be8287989
Fix comments of helper functions that set local config values (#4100) 2020-08-07 11:20:38 +03:00
Marco Slot 768d8b232c Do not take multi-shard locks on workers 2020-08-06 21:48:25 +02:00
Halil Ozan Akgül b7efb51e63
Merge pull request #3913 from citusdata/undistribute-table
Undistribute Table
2020-08-05 15:30:52 +03:00
Halil Ozan Akgul 375310b7f1 Adds support for table undistribution 2020-08-05 14:36:03 +03:00
SaitTalhaNisanci 7378ab6bf8
Add postgres 13 to configure.in (#4088) 2020-08-05 11:36:55 +03:00
SaitTalhaNisanci 3d1fd08fcf
Merge pull request #3900 from citusdata/enh/pg13Support
Add PG13 support
2020-08-04 23:53:47 +03:00
Sait Talha Nisanci 195c2a91e2 Use citus docker repo instead of personal account 2020-08-04 23:07:00 +03:00
Sait Talha Nisanci fe4ac51d8c Normalize Output:.. since it changes with pg13
Fix indentation for better readability
2020-08-04 15:38:13 +03:00
Sait Talha Nisanci 283b1db6a4 add pg13 to CI 2020-08-04 15:38:13 +03:00
Sait Talha Nisanci 33406598e3 Add ruleutils changes from 3977 and 4011 2020-08-04 15:38:13 +03:00
Sait Talha Nisanci 63ed126ad4 Set buffer usage with explain
It seems that currently we process even postgres tables in explain
commands. This is because we register a hook for explain and we don't
have any check to see if the query has any citus table.

With this commit, we now send the buffer usage as well to the relevant
API. There is some duplicate in the code but it is because of the
existing structure, we can refactor this separately.
2020-08-04 15:38:13 +03:00
Sait Talha Nisanci fe1e1c9b68 Replace Set_ptr_value as SetListCellPtr to be more explicit
Move header to right place and fix comment style
2020-08-04 15:38:13 +03:00
Sait Talha Nisanci 8e9b52971c Use new var field names in the codebase
The codebase is updated to use varattnosync and varnosyn and we defined
the macros for older versions. This way we can just remove the macros
when we drop an older version.
2020-08-04 15:38:13 +03:00
Sait Talha Nisanci b641f63bfd Use CMDTAG_SELECT_COMPAT
CMDTAG_SELECT exists in PG12 hence defining a MACRO such as
CMDTAG_SELECT -> "SELECT" is not possible. I chose CMDTAG_SELECT_COMPAT
because with the COMPAT suffix it is explicit that it maps to different
things in different versions and also has a less chance of mapping
something irrevelant. For example if we used SELECT as a macro, then it
would map every SELECT to whatever it is mapping to, which might have
unexpected/undesired behaviour.
2020-08-04 15:38:13 +03:00
Sait Talha Nisanci d68bfc5687 Improve error for index operator class parameters
The error message when index has opclassopts is improved and the commit
from postgres side is also included for future reference.

Also some minor style related changes are applied.
2020-08-04 15:38:13 +03:00
Sait Talha Nisanci 288aa58603 add alternative out for pg13 test 2020-08-04 15:38:13 +03:00
Sait Talha Nisanci d0b0c88920 Changelog: error out if index has opclassopts
Error out if index has opclassopts.

Changelog entry on PG13:
Allow CREATE INDEX to specify the GiST signature length and maximum number of integer ranges (Nikita Glukhov)
2020-08-04 15:38:13 +03:00
Sait Talha Nisanci f7a1971361 Changelog: Alter type options
It seems that we don't support propagating commands related to base
types. Therefore Alter TYPE options doesn't seem to apply to us. I have
added a test to verify that we don't propagate them.

Changelog entry on pg13:
Add ALTER TYPE options useful for extensions, like TOAST and I/O functions control (Tomas Vondra, Tom Lane)
2020-08-04 15:38:11 +03:00
Sait Talha Nisanci 00633165fc Changelog: Test unicode escapes
Unicode escapes work as expected, related tests are added.

Changelog entry on PG13:
Allow Unicode escapes, e.g., E'\u####', U&'\####', to specify any character available in the database encoding, even when the database encoding is not UTF-8 (Tom Lane)
2020-08-04 15:36:30 +03:00
Sait Talha Nisanci 79dcb80140 Changelog: Test IS NORMALIZED for pg13
Tests for is_normalized and normalized ar eadded. One thing that seems
to be because of existent bug is that when we don't give the second
argument to normalize or is_normalized, which is optional, it crashes.
Because in the executor part, in the expression we don't have the
default argument.

Changelog entry in PG-13:
Add SQL functions NORMALIZE() to normalize Unicode strings, and IS NORMALIZED to check for normalization (Peter Eisentraut)

Commit on Postgres:
2991ac5fc9b3904ca4582be6d323497d7c3d17c9
2020-08-04 15:18:27 +03:00
Sait Talha Nisanci ebabca16b7 Changelog: Test row suffix notation
It seems that row suffix notation is working fine with our code, a test
is added.

Changelog entry in PG13:
Allow ROW values values to have their members extracted with suffix notation (Tom Lane)
2020-08-04 15:18:27 +03:00
Sait Talha Nisanci 275ccd0400 Changelog: Test that alter view rename column works
Changelog entry in PG13:
Add ALTER VIEW syntax to rename view columns (Fujii Masao)
2020-08-04 15:18:27 +03:00