Commit Graph

5210 Commits (0ce6650c884d0cc5295887570884269346cfe4ed)

Author SHA1 Message Date
Onur Tirtir 0ce6650c88 Use pg14 in CONTRIBUTING.md 2021-10-01 12:38:55 +02:00
Onder Kalaci 0995cfef49 Reflect PG14 changes in the readme 2021-10-01 10:03:27 +02:00
SaitTalhaNisanci d7fde7dd1a
upgrade to 14.0 (#5330) 2021-09-30 17:27:37 +03:00
Önder Kalacı c2311b4c0c
Make (columnar.stripe) first_row_number index a unique constraint (#5324)
* Make (columnar.stripe) first_row_number index a unique constraint

Since stripe_first_row_number_idx is required to scan a columnar
table, we need to make sure that it is created before doing anything
with columnar tables during pg upgrades.

However, a plain btree index is not a dependency of a table, so
pg_upgrade cannot guarantee that stripe_first_row_number_idx gets
created when creating columnar.stripe, unless we make it a unique
"constraint".

To do that, drop stripe_first_row_number_idx and create a unique
constraint with the same name to keep the code change at minimum.

* Add more pg upgrade tests for columnar

* Fix a logic error in uprade_columnar_after test

Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2021-09-30 10:51:56 +03:00
Jelte Fennema 97077c5c4a
Check more exit codes in upgrade tests (#5323)
We were trying to find the cause for a strange update bug. We thought
`pg_upgrade` succeeded and then were surprised that certain data was not
in the database after the upgrade. Instead `pg_upgrade` had failed
halfway through with an actionable error. It took us pretty long to
realise this.

This commit adds checking of exit codes to a lot more subprocess
executions. That should make debugging in the future much easier.
2021-09-24 15:51:00 +02:00
Onur Tirtir 726b3b90a5
Merge pull request #5322 from citusdata/changelog-10.2.1
Add changelog for 10.2.1
2021-09-24 13:08:46 +03:00
Onur Tirtir 2f1bf9499f Add changelog for 10.2.1 2021-09-24 12:48:13 +03:00
SaitTalhaNisanci 800ad5eca6
Update images to use rc (#5320) 2021-09-24 11:15:37 +03:00
Onur Tirtir 67de6be913
Merge pull request #5319 from citusdata/fix-clog-lookup
BuildStripeMetadata() calls HeapTupleHeaderGetXmin(), which must only
be called on a proper heap tuple with MVCC information. Make sure the
caller passes the heap tuple, and not a datum tuple.
2021-09-24 10:55:36 +03:00
Jeff Davis d49d321eac Columnar: only call BuildStripeMetadata() with heap tuple.
BuildStripeMetadata() calls HeapTupleHeaderGetXmin(), which must only
be called on a proper heap tuple with MVCC information. Make sure the
caller passes the heap tuple, and not a datum tuple.

Fixes #5318.
2021-09-23 15:51:01 -07:00
Teja Mupparti 9cc125166b
Merge pull request #5310 from citusdata/teja_colocate_partitions
Parition shards to be colocated with parent shards
2021-09-22 16:18:30 -07:00
tejeswarm a1604a87e6 Parition shards to be colocated with the parent shards 2021-09-22 14:47:04 -07:00
Onur Tirtir 77a2dd68da
Revoke read access to columnar.chunk from unprivileged user (#5313)
Since this could expose chunk min/max values to unprivileged users.
2021-09-22 16:23:02 +03:00
Onur Tirtir 8a769ec916
Merge pull request #5278 from citusdata/col/pushdown-boolexpr
Columnar CustomScan: Pushdown BoolExpr's as we do before
2021-09-22 11:13:47 +03:00
Onur Tirtir 68335285b4 Columnar CustomScan: Pushdown BoolExpr's as we do before 2021-09-22 10:51:34 +03:00
Onur Tirtir e6ed764f63
Check if xact id is in progress before checking if aborted (#5312) 2021-09-21 21:20:31 +03:00
Onur Tirtir f8b1ff7214
Add CheckCitusVersion() calls to columnarAM (#5308)
Considering all code-paths that we might interact with a columnar table,
add `CheckCitusVersion` calls to tableAM callbacks:
- initializing table scan (`columnar_beginscan` & `columnar_index_fetch_begin`)
- setting a new filenode for a relation (storage initializiation or a table rewrite)
- truncating the storage
- inserting tuple (single and multi)

Also add `CheckCitusVersion` call to:
- drop hook (`ColumnarTableDropHook`)
- `alter_columnar_table_set` & `alter_columnar_table_reset` UDFs
2021-09-20 17:26:41 +03:00
Önder Kalacı 3b588359d2
Merge pull request #5307 from citusdata/add_missing_version_checks
Add missing version checks for citus_internal_XXX functions
2021-09-20 10:00:33 +02:00
Onder Kalaci cea937f52f Add missing version checks for citus_internal_XXX functions 2021-09-20 09:54:35 +02:00
Hanefi Onaldi b29dd95e19
Merge pull request #5302 from citusdata/missing_v_changelog 2021-09-17 20:19:06 +03:00
Gürkan İndibay c495552255
Missing v in changelogs 2021-09-17 15:24:57 +03:00
Hanefi Onaldi 2e6b78133c
Merge pull request #5301 from citusdata/changelog-10.1.3 2021-09-17 15:01:29 +03:00
Hanefi Onaldi 0d67b7f479
Merge branch 'master' into changelog-10.1.3 2021-09-17 14:53:51 +03:00
SaitTalhaNisanci 35ff513dfe
Give proper error while distributing a temp table (#5269) 2021-09-17 14:34:40 +03:00
Hanefi Onaldi c995a55641
Add changelog entries for 10.1.3 2021-09-17 14:32:17 +03:00
Önder Kalacı 63fa24fedd
Merge pull request #5300 from citusdata/improve_read_me
Reflect Citus 10.2 changes in the README
2021-09-17 10:18:39 +02:00
Onder Kalaci 9b24553b46 Reflect Citus 10.2 changes in the README
I tried with Linux (ubuntu 20.04) and CentOS 8.3 - Gen1, all works expected.
Also, updated reflected index support on columnar tables.
2021-09-17 09:55:36 +02:00
Hanefi Onaldi c82d82f921
Merge pull request #5292 from citusdata/changelog-9.5.8 2021-09-15 19:22:26 +03:00
Hanefi Onaldi 92af115f21
Add changelog entries for 9.5.8 2021-09-15 15:53:36 +03:00
Gurkan Indibay 082667a985
Add changelog entries for 10.2.0 2021-09-15 05:20:13 +03:00
jeff-davis 6e8b19984e
Columnar: separate plan and runtime quals. (#5261)
* Columnar: separate plain and exec quals.

Make a clear separation between plain quals, which contain constants
or extern params; and exec quals, which contain exec params and can't
be evaluated until a rescan.

Fixes #5258.

* more vanilla tests

Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2021-09-13 10:54:53 -07:00
jeff-davis d48ceee238
Columnar: add method ReparameterizeCustomPathByChild. (#5275)
When performing a partition-wise join, the planner will adjust paths
parameterized by the parent rel to instead parameterize by the child
rel directly. When this reparameterization happens, we also need to
adjust the join quals to reference the child rather than the parent.

Fixes #5257.
2021-09-13 10:33:48 -07:00
Onur Tirtir ea61efb63a
Not flush writes until need to read them when doing index-scan on columnar (#5247)
Not flush pending writes if given tid belongs to a "flushed" or
"aborted" stripe write, or to an "in-progress" stripe write of
another backend.

That way, we would reduce the cases where we flush single-tuple
stripes during index scan.

To do that, we follow below steps for index look-up's:

- Do not flush any pending writes and do stripe metadata look-up for
  given tid.
  If tuple with tid is found, then no need to do another look-up
  since we already found the tuple without needing to flush pending
  writes.

- If tuple is not found without flushing pending writes, then we have two
  scenarios:

  -  If given tid belongs to a pending write of my backend, then do stripe
     metadata look-up for given tid. But this time first **flush any pending
     writes**.
     
  -  Otherwise, just return false from `index_fetch_tuple` since flushing
      pending writes wouldn't help.
2021-09-13 18:41:20 +02:00
Onur Tirtir 4ee0fb2758
Make sure to skip aborted writes when reading the first tuple (#5274)
With 5825c44d5f, we made the changes to
skip aborted writes when scanning a columnar table.

However, looks like we forgot to handle such cases for the very first
call made to columnar_getnextslot. That means, that commit only
considered the intermediate stripe read operations.

However, functions called by columnar_getnextslot to find first stripe
to read (ColumnarBeginRead & ColumnarRescan) were not caring about
those aborted writes.

To fix that, we teach AdvanceStripeRead to find the very first stripe
to read, and then start using it where were blindly calling
FindNextStripeByRowNumber.
2021-09-13 11:50:53 +03:00
Burak Velioglu 531ad83b8c
Merge pull request #5263 from citusdata/velioglu/handle_errors_on_abort
Swallow errors while aborting remote transactions
2021-09-10 11:18:47 +03:00
Burak Velioglu ceec5d72e3
Swallow errors while aborting remote transactions 2021-09-10 11:06:16 +03:00
Naisila Puka a69abe3be0
Fixes bug about int and smallint sequences on MX (#5254)
* Introduce worker_nextval udf for int&smallint column defaults

* Fix current tests and add new ones for worker_nextval
2021-09-09 23:41:07 +03:00
Nils Dijk 80a44a7b93
prevent double inclusion of columnar_tableam.h (#5266)
Recently there are some warnings during the compilation of Citus.
Part of the warnings come due to the `columnar_tableam.h` header not being properly guarded with defines and ifndef's.

This PR fixes these warnings.
2021-09-09 17:37:58 +02:00
Onur Tirtir be74518965
Improve memset calls made to reset bool arrays (#5262) 2021-09-09 17:56:03 +03:00
Halil Ozan Akgül f4428412a0
Merge pull request #5234 from citusdata/cte_with_search_clause
Errors for CTEs with search clause
2021-09-09 13:53:44 +03:00
Halil Ozan Akgul 19af1cef2f Errors for CTEs with search clause
Relevant PG commit:
3696a600e2292d43c00949ddf0352e4ebb487e5b
2021-09-09 13:48:24 +03:00
Marco Slot b3f1a94688
Merge pull request #5256 from citusdata/marcocitus/worker_append_table_to_shard
Perform copy command as regular user in worker_append_table_to_shard
2021-09-09 12:37:36 +02:00
Marco Slot f84164a000 Avoid switch to superuser in worker_merge_files_into_table 2021-09-09 11:00:29 +02:00
Marco Slot 04388e13b0 Add worker_append_table_to_shard permissions tests 2021-09-09 11:00:29 +02:00
Marco Slot 4faa49775b Perform copy command as regular user in worker_append_table_to_shard 2021-09-09 11:00:29 +02:00
Hanefi Onaldi 9ae912a8c8
Prevent C-style comments in all directories (#5250) 2021-09-09 11:54:58 +03:00
SaitTalhaNisanci e3e0a028c7
return early in case we want to skip outer vars (#5259) 2021-09-09 10:53:36 +03:00
Onur Tirtir 32e3e51ed4
Fix a compiler warning that we get on debian (#5260) 2021-09-08 20:03:59 +03:00
Onur Tirtir 74d9d2a718
Merge pull request #5246 from citusdata/col/no-index-only 2021-09-08 14:19:39 +03:00
Onur Tirtir 9935dfb958 Remove a flaky test from columnar_paths
We already knew that it was flaky. Moreover, now it failed on my
branch too.

So removing it with this commit.
2021-09-08 14:15:22 +03:00