Commit Graph

4271 Commits (3f81ee26fd899a5f5749ced1e777deafead4f767)

Author SHA1 Message Date
Hadi Moshayedi 3f81ee26fd Columnar: Support LZ4 compression 2020-12-09 08:29:07 -08:00
jeff-davis 260a02180b
Add tests for unsupported columnar storage features (#4397)
Add negative tests:
 * Deletes
 * Sample scan
 * Special columns
 * Tuple locks
 * Indexes
2020-12-09 00:08:45 -08:00
jeff-davis 776c165843
Merge pull request #4396 from citusdata/rename2
Rename cstore->columnar in SQL objects and errors.
2020-12-07 15:43:13 -08:00
Jeff Davis c91e5b052b more test fixups 2020-12-07 13:43:27 -08:00
Jeff Davis 7169ba21c4 more test fixes 2020-12-07 13:36:46 -08:00
Jeff Davis e26fdeb706 fixup tests some more 2020-12-07 13:22:16 -08:00
Jeff Davis 5b3c32eb38 fixup tests 2020-12-07 13:18:22 -08:00
Jeff Davis 068af7f38e fixup upgrade tests 2020-12-07 13:11:51 -08:00
Jeff Davis 3758e83850 Rename cstore->columnar in SQL objects and errors. 2020-12-07 13:01:53 -08:00
jeff-davis dee753ef05
Merge pull request #4394 from citusdata/test-update
Tests for UPDATE and error message improvement.
2020-12-07 12:10:13 -08:00
Jeff Davis ad919ff220 Tests for UPDATE and error message improvement.
UPDATEs on partitioned tables that affect only row partitions should
succeed, the rest should fail.

Also rename CStoreScan to ColumnarScan to make the error message more
relevant.
2020-12-07 11:25:30 -08:00
Ahmet Gedemenli 45ac491885
Merge pull request #4390 from citusdata/fix-transaction-name-length-calculation
Fix transaction name length calculation
2020-12-07 12:56:13 +03:00
Ahmet Gedemenli 7577821920 Fix transaction name length calculation 2020-12-07 12:34:15 +03:00
Ahmet Gedemenli 3d8a7c1741
Merge pull request #4381 from citusdata/recover-transactions-when-removing-node
Delete transactions when removing node
2020-12-07 11:53:26 +03:00
Ahmet Gedemenli 936775e8e3 Delete transactions when removing node
With this commit, we delete entries in pg_dist_transaction
for the primary nodes that are removed by `master_remove_node`.
2020-12-07 11:35:20 +03:00
Hadi Moshayedi 164d73ad8c
Merge pull request #4386 from citusdata/cstore_uncompressed_size
Columnar: track decompressed length in metadata
2020-12-04 11:16:50 -08:00
Hadi Moshayedi 01da2a1c73 Columnar: track decompressed length in metadata 2020-12-04 09:09:39 -08:00
Önder Kalacı d4f5d4a27b
Merge pull request #4364 from citusdata/add_some_data_type_tests
Add regression tests with different data types
2020-12-04 10:40:34 +03:00
Onder Kalaci bd9827aed9 Add regression tests with different data types
We typically do not test Citus with these uncommon
data types. Now, we already have the tests for ADF
integration, add it to regression tests as well.
2020-12-04 10:25:00 +03:00
Hadi Moshayedi c23bdb129d
Merge pull request #4379 from citusdata/cstore_chunk
Columnar: rename block to chunk
2020-12-03 09:01:10 -08:00
Hadi Moshayedi 317cf44a56
Merge pull request #4375 from citusdata/cstore_empty
Columnar: Fix VACUUM for empty tables
2020-12-03 09:00:47 -08:00
Hadi Moshayedi 4a9aebaa7b Columnar: rename block to chunk 2020-12-03 08:50:19 -08:00
Hadi Moshayedi 24bfd368a9 Columnar: Fix VACUUM for empty tables 2020-12-03 08:46:09 -08:00
Marco Slot c4f36c195f
Merge pull request #4309 from citusdata/features/add-citus-tables-view 2020-12-03 17:44:14 +01:00
Marco Slot c9b658daea Add a public.citus_tables view 2020-12-03 17:31:40 +01:00
Marco Slot 4098d33acb Allow citus size functions on replicated tables 2020-12-03 16:33:24 +01:00
SaitTalhaNisanci f164575524
Add a utility to process each table index (#4382)
A utility function is added so that each caller can implement a handler
for each index on a given table. This means that the caller doesn't need
to worry about how to access each index, the only thing that it needs to
do each to implement a function to which each index on the table is
passed iteratively.
2020-12-03 16:33:13 +03:00
Marco Slot 746b36103e
Merge pull request #4380 from citusdata/marcocitus/fix-flappy
Fix flappy failure test
2020-12-03 14:17:14 +01:00
Marco Slot c69ea2512a Fix flappy failure test 2020-12-03 13:54:02 +01:00
Önder Kalacı 9789a7005f
Merge pull request #4338 from citusdata/single_node_conn_mngmt_main
Local node connection management
2020-12-03 14:35:35 +03:00
Onder Kalaci c546ec5e78 Local node connection management
When Citus needs to parallelize queries on the local node (e.g., the node
executing the distributed query and the shards are the same), we need to
be mindful about the connection management. The reason is that the client
backends that are running distributed queries are competing with the client
backends that Citus initiates to parallelize the queries in order to get
a slot on the max_connections.

In that regard, we implemented a "failover" mechanism where if the distributed
queries cannot get a connection, the execution failovers the tasks to the local
execution.

The failover logic is follows:

- As the connection manager if it is OK to get a connection
	- If yes, we are good.
	- If no, we fail the workerPool and the failure triggers
	  the failover of the tasks to local execution queue

The decision of getting a connection is follows:

/*
 * For local nodes, solely relying on citus.max_shared_pool_size or
 * max_connections might not be sufficient. The former gives us
 * a preview of the future (e.g., we let the new connections to establish,
 * but they are not established yet). The latter gives us the close to
 * precise view of the past (e.g., the active number of client backends).
 *
 * Overall, we want to limit both of the metrics. The former limit typically
 * kics in under regular loads, where the load of the database increases in
 * a reasonable pace. The latter limit typically kicks in when the database
 * is issued lots of concurrent sessions at the same time, such as benchmarks.
 */
2020-12-03 14:16:13 +03:00
Hadi Moshayedi c2f60b6422
Columnar: pg_upgrade support (#4354) 2020-12-02 08:46:59 -08:00
Nils Dijk 27113255e5
add codecov upload task for pg_upgrade tests (#4377)
Small change that will upload lines hit during upgrades to codecov.
It got to our attention we are not capturing the codecov during upgrades in #4354 .
2020-12-02 15:21:59 +01:00
Ahmet Gedemenli 5b0e60884e
Merge pull request #4373 from citusdata/propagate-alter-schema-rename
Propagate alter schema rename
2020-12-02 15:29:26 +03:00
Ahmet Gedemenli 5242dcfe99 Add tests for propagating alter schema rename 2020-12-02 15:18:26 +03:00
Ahmet Gedemenli 514c6a76ac Propagate alter schema rename 2020-12-02 15:18:26 +03:00
Nils Dijk fde93072dd
Merge pull request #4335 from citusdata/fix/cstore-options-dist-tables
columnar table options for distributed tables
2020-12-02 13:12:57 +01:00
Nils Dijk 6f9c040f76
DESCRIPTION: Propagate columnar table settings for distributed tables
When distributing a columnar table, as well as changing options on a distributed columnar table, this patch will forward the settings from the coordinator to the workers.

For propagating options changes on an already distributed table this change is pretty straight forward. Before applying the change in options locally we will create a `DDLJob` that contains a call to `alter_columnar_table_set(...)` for every shard placement with all settings of the current table. This goes both for setting an option as well as resetting. This will reset the values to the defaults configured on the coordinator. Having the effect that the coordinator is authoritative on the settings and makes sure the shards have the same settings set as the table on the coordinator.

When a columnar table is distributed it is using the `TableDDLCommand` infra structure to create a new kind of `TableDDLCommand`. This new type, called a `TableDDLCommandFunction` contains a context and 2 function pointers to execute. One function returns the command as applied on the table, the second function will return the sql command to apply to a shard with a given shard id. The schema name is ignored as it will use the fully qualified name of the shard in the same schema as the base table.
2020-12-02 13:02:42 +01:00
Halil Ozan Akgül ef0914a7f8
Adds ORDER BY to flaky test (#4305)
Co-authored-by: Önder Kalacı <onder@citusdata.com>
2020-12-02 14:24:05 +03:00
Önder Kalacı 48d6266fd4
Merge pull request #4374 from citusdata/sequential_execution_use_lcao
Multi-row INSERTs use local execution when placements are local
2020-12-01 22:45:35 +03:00
Onder Kalaci f7e1aa3f22 Multi-row INSERTs use local execution when placements are local
Multi-row execution already uses sequential execution. When shards
are local, using local execution is profitable as it avoids
an extra connection establishment to the local node.
2020-12-01 21:37:59 +03:00
Onur Tirtir ea79ca0e5e
Merge pull request #4372 from citusdata/update-cl-951
Update CHANGELOG for 9.5.1
2020-12-01 16:51:36 +03:00
Onur Tirtir dd3453ced5 Update CHANGELOG for 9.5.1 2020-12-01 14:02:36 +03:00
Marco Slot df3539710a
Merge pull request #4370 from citusdata/marcocitus/fix-flappy 2020-12-01 11:30:53 +01:00
Ahmet Gedemenli cc9ea31c60
Merge pull request #4356 from citusdata/add-test-for-citus-size-func
Add test for citus table size func in transaction with modification
2020-12-01 11:08:20 +03:00
Ahmet Gedemenli 8e5f0487eb Add order by for flaky test 2020-12-01 10:54:52 +03:00
Ahmet Gedemenli 67761897ab Add test for citus table size func in transaction with modification
Add test for citus_relation_size
2020-12-01 10:38:15 +03:00
Hadi Moshayedi feecb7b423
Columnar: few fixes (#4371)
* Columnar: fix a memory issue

* Columnar: no need for deferred triggers

* Columnar: relax memory growth constraints
2020-11-30 18:09:43 -08:00
Hadi Moshayedi a94e8c9cda
Associate column store metadata with storage id (#4347) 2020-11-30 18:01:43 -08:00
Marco Slot de22b633cb
Merge pull request #4365 from citusdata/marcocitus/fix-flappy
Fix flappy test: Run subquery_prepared_statements by itself
2020-11-30 22:35:51 +01:00