Commit Graph

4272 Commits (f5a4a4bc74a0fb3d0e2bfb217fc2c4d849f1a2dc)

Author SHA1 Message Date
Hadi Moshayedi 6711340ea6 Add prepared xact & stmt tests for columnar 2020-11-17 20:00:57 -08:00
Hadi Moshayedi 3088ccd62a
Merge pull request #4319 from citusdata/cstore_write_state_management
Implements write state management for tuple inserts.
2020-11-17 12:17:51 -08:00
Hadi Moshayedi 97cba2d5b6 Implements write state management for tuple inserts.
TableAM API doesn't allow us to pass around a state variable along all of the tuple inserts belonging to the same command. We require this in columnar store, since we batch them, and when we have enough rows we flush them as stripes.

To do that, we keep a (relfilenode) -> stack of (subxact id, TableWriteState) global mapping.

**Inserts**

Whenever we want to insert a tuple, we look up for the relation's relfilenode in this mapping. If top of the stack matches current subtransaction, we us the existing TableWriteState. Otherwise, we allocate a new TableWriteState and push it on top of stack.

**(Sub)Transaction Commit/Aborts**

When the subtransaction or transaction is committed, we flush and pop all entries matching current SubTransactionId.

When the subtransaction or transaction is committed, we pop all entries matching current SubTransactionId and discard them without flushing.

**Reads**

Since we might have unwritten rows which needs to be read by a table scan, we flush write states on SELECTs. Since flushing the write state of upper transactions in a subtransaction will cause metadata being written in wrong subtransaction, we ERROR out if any of the upper subtransactions have unflushed rows.

**Table Drops**

We record in which subtransaction the table was dropped. When committing a subtransaction in which table was dropped, we propagate the drop to upper transaction. When aborting a subtransaction in which table was dropped, we mark table as not deleted.
2020-11-17 12:07:16 -08:00
Nils Dijk 2e09116b30
Merge pull request #4311 from citusdata/merge-cstore
Merge cstore into the citus repo
2020-11-17 19:10:32 +01:00
Nils Dijk 725f4a37d0
change configure to not have options 2020-11-17 19:01:54 +01:00
Nils Dijk 22df8027b0
add extra output for multi_extension targeting pg11 2020-11-17 19:01:54 +01:00
Nils Dijk 7c891a01a9 create missing objects during upgrade path 2020-11-17 19:01:51 +01:00
Nils Dijk 2987535172
add pg upgrade tests verifying table am is created 2020-11-17 18:55:36 +01:00
Hadi Moshayedi 691fdb2c64
Don't grab in additional locks cstore code when truncating 2020-11-17 18:55:36 +01:00
Nils Dijk d065bb495d
Prepare downgrade script and bump development version to 10.0-1 2020-11-17 18:55:35 +01:00
Nils Dijk 3e5df81e89
remove use of banned api 2020-11-17 18:55:35 +01:00
Nils Dijk b6d4a1bbe2
fix style 2020-11-17 18:55:35 +01:00
Nils Dijk 3bb6554976
make tests run 2020-11-17 18:55:35 +01:00
Nils Dijk 213eb93e6d
make columnar compile and functionally working 2020-11-17 18:55:34 +01:00
Nils Dijk f89bd3eeb5
move columnar test files 2020-11-17 18:55:34 +01:00
Nils Dijk 30fbd877e7
remove readme that has outdated info 2020-11-17 18:55:34 +01:00
Nils Dijk 527d3ce0bb
move headers to include directory 2020-11-17 18:55:34 +01:00
Nils Dijk 5fe4c12d49 Add 'src/backend/columnar/' from commit '4339e911933ca2109db46014befdaccf77c5c13f'
git-subtree-dir: src/backend/columnar
git-subtree-mainline: 34de1f645c
git-subtree-split: 4339e91193
2020-11-17 18:55:06 +01:00
SaitTalhaNisanci 34de1f645c
Update failure test dependencies (#4284)
* Update failure test dependencies

There was a security alert for cryptography. The vulnerability was fixed
in 3.2.0. The vulnebarility:

"RSA decryption was vulnerable to Bleichenbacher timing vulnerabilities,
which would impact people using RSA decryption in online scenarios."

The fix:
58494b41d6

It wasn't enough to only update crpytography because mitm was
incompatible with the new version, so mitm is also upgraded.

The steps to do in local:
python -m pip install -U cryptography
python -m pip install -U mitmproxy
2020-11-17 19:16:08 +03:00
Önder Kalacı 0c0fc69f2a
Remove unused field (#4275) 2020-11-17 11:41:57 +01:00
Nils Dijk d0c6950d43
Merge pull request #4310 from citusdata/fix/enterprise-modules
add placeholder for enterprise modules
2020-11-11 16:22:23 +01:00
Nils Dijk 7d14800071
add placeholder for enterprise modules 2020-11-11 15:43:04 +01:00
Onur Tirtir 601e6baa96
Merge pull request #4307 from citusdata/citus-9.5.0-changelog-1604924343
Update CHANGELOG for 9.5.0
2020-11-11 16:42:10 +03:00
Onur Tirtir 52a5ab0751 Update CHANGELOG for 9.5.0 2020-11-11 16:01:52 +03:00
Onur Tirtir 4bf754b245
Fix location of citus--10.0-1--9.5-1.sql downgrade script (#4306) 2020-11-09 16:43:56 +03:00
Onur Tirtir 65c7827cab
Merge pull request #4304 from citusdata/master-update-version-1604913966
Bump Citus to 10.0devel
2020-11-09 14:47:23 +03:00
Onur Tirtir 5e3dc9d707 Bump citus version to 10.0devel 2020-11-09 13:16:54 +03:00
Hanefi Onaldi d3019f1b6d
Introduce foreach_ptr_modify macro (#4303)
If one wishes to iterate through a List and insert list elements in
PG13, it is not safe to use for_each_ptr as the List representation
in PostgreSQL no longer linked lists, but arrays, and it is possible
that the whole array is repalloc'ed if ther is not sufficient space
available.

See postgres commit 1cff1b95ab6ddae32faa3efe0d95a820dbfdc164 for more
information
2020-11-09 12:03:59 +03:00
Onur Tirtir 5d5966f700
Fix a flaky test in mixed_relkind_tests (#4300) 2020-11-06 14:53:30 +03:00
Önder Kalacı 1f723cabd2
Merge pull request #4292 from citusdata/fix_local_join
Do not rely on set_rel_pathlist_hook for finding local relations
2020-11-06 11:26:03 +01:00
Onder Kalaci e0d2ac7620 Do not rely on set_rel_pathlist_hook for finding local relations
When a relation is used on an OUTER JOIN with FALSE filters,
set_rel_pathlist_hook may not be called for the table.

There might be other cases as well, so do not rely on the hook
for classification of the tables.
2020-11-06 11:14:30 +01:00
Onur Tirtir 0556952607
Normalize partitioned table aliases in explain output (#4295)
Aliases that postgres choose for partitioned tables in explain output
might change in different pg versions, so normalize them and remove
the alternative test output
2020-11-06 10:44:01 +03:00
Onur Tirtir d912d4bc38
Print full file path in valgrind testing (#4299) 2020-11-06 10:26:53 +03:00
Onur Tirtir cc8be422ce
Fix relkind checks in planner for relkinds other than RELKIND_RELATION (#4294)
We were qualifying relations with relkind != RELKIND_RELATION as
non-relations due to the strict checks around RangeTblEntry->relkind
in planner.
2020-11-05 14:21:02 +03:00
SaitTalhaNisanci 25de5b1290
Fix uninitilized variable (#4293)
Valgrind found that, we were doing an if check on uninitialized variable
and it seems that this is on context.appendparents.

ac22929a26/src/backend/utils/adt/ruleutils.c (L1054)
2020-11-04 12:08:15 +03:00
Hanefi Onaldi 96913f6530
Merge pull request #4286 from citusdata/prevent-undistribute-partitions 2020-11-04 10:35:08 +03:00
jeff-davis 4339e91193 Merge pull request #31 from citusdata/upgrade
Handle case of partially-present metadata.
2020-11-03 12:15:51 -08:00
Jeff Davis 630e579912 Handle case of partially-present metadata. 2020-11-03 10:39:39 -08:00
Hanefi Önaldı d6f19e2298
Honor error message conventions 2020-11-03 18:11:18 +03:00
Hanefi Önaldı 85a4b61a0e
Prevent undistribute_table calls for partitions 2020-11-03 18:10:20 +03:00
Hanefi Onaldi feca381500
Merge pull request #4279 from citusdata/prevent-undistribute-foreign-tables
Prevent undistribute_table calls for foreign tables
2020-11-03 18:08:05 +03:00
Hanefi Önaldı 5db380f33a
Prevent undistribute_table calls for foreign tables 2020-11-03 17:33:29 +03:00
Nils Dijk d03e9ca861 Feature: cstore table options (#25)
DESCRIPTION: Add UDF's to maintain cstore table options

This PR adds two UDF's and a view to interact and maintain the cstore table options.

 - ``alter_cstore_table_set(relid REGCLASS, [ options ... ])``
 - ``alter_cstore_table_reset(relid REGCLASS, [ options ... ])``
 - ``cstore.cstore_options``

The `set` function takes options and their specific types. When specified it will change the option associated with the table to the provided value. When omitted no action is taken.

The `reset` function takes options as booleans. When set to `true` the value of the option associated with the table will be reset to the current default as specified by the associated GUC's.

The options view containes a record for every cstore table with its associated settings as columns.
2020-11-03 13:39:46 +01:00
jeff-davis 8909769975 Merge pull request #29 from citusdata/w-error
Use -Werror
2020-11-02 08:00:07 -08:00
Jeff Davis 653dbc615a Use -Werror 2020-11-02 07:55:19 -08:00
jeff-davis d455ef6785 Merge pull request #30 from citusdata/v13
Support for v13
2020-11-02 07:52:32 -08:00
Nils Dijk 288025d9ea add pg13 on CI 2020-11-02 13:04:18 +01:00
Sait Talha Nisanci 7c11aa124b Add component governance config
This config is used to generate components on ADO(Azure devops).
Currently this might not be super useful because we don't really use ADO
but when run, we can see the warnings/issues with components that we
use. A component is like a dependency basically.
2020-11-02 11:11:24 +03:00
Jeff Davis acd49b68aa Support for v13 2020-11-01 16:59:10 -08:00
Hadi Moshayedi 65cf9f0a6c Merge pull request #27 from citusdata/fix-clean
fix "make clean"
2020-10-30 21:08:26 -07:00