Commit Graph

4116 Commits (release-9.5)

Author SHA1 Message Date
Gokhan Gulbiz d6f30e6eb4
Backport GHA Migration to release-9.5 (#7282)
Co-authored-by: Jelte Fennema-Nio <jelte.fennema@microsoft.com>
2023-11-07 09:08:20 +02:00
Hanefi Onaldi 00cd336e70
Bump Citus version to 9.5.12 2023-04-26 16:51:09 +03:00
Hanefi Onaldi 8730ede7f6
Add changelog entries for 9.5.12 2023-04-26 16:44:52 +03:00
aykut-bozkurt 0a651c230a fix single tuple result memory leak (#6724)
We should not omit to free PGResult when we receive single tuple result
from an internal backend.
Single tuple results are normally freed by our ReceiveResults for
`tupleDescriptor != NULL` flow but not for those with `tupleDescriptor
== NULL`. See PR #6722 for details.

DESCRIPTION: Fixes memory leak issue with query results that returns
single row.

(cherry picked from commit 9e69dd0e7f)
2023-02-17 14:42:26 +03:00
Halil Ozan Akgul ff67594a96 Fixes the bug where undistribute can drop Citus extension
(cherry picked from commit b255706189)

 Conflicts:
	src/backend/distributed/commands/alter_table.c
	src/include/distributed/metadata/dependency.h
2022-06-13 17:28:01 +03:00
Onur Tirtir b688eb90e1 Fix coordinator/worker query targetlists for agg. that we cannot push-down (#5679)
Previously, we were wrapping targetlist nodes with Vars that reference
to the result of the worker query, if the node itself is not `Const` or
not a `Param`. Indeed, we should not do that unless the node itself is
a `Var` node or contains a `Var` within it (e.g.: `OpExpr(Var(column_a) > 2)`).
Otherwise, when worker query returns empty result set, then combine
query exec would crash since the `Var` would be pointing to an empty
tuple slot, which is not desirable for the node-executor methods.

(cherry picked from commit 79442df1b7)
2022-02-07 11:40:18 +03:00
Sait Talha Nisanci 95088218e6 Add the NOTICE file
(cherry picked from commit 5f436e10d0)
2021-11-19 09:40:27 +00:00
Sait Talha Nisanci b46c6bf64f 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.

(cherry picked from commit 7c11aa124b)
2021-11-19 09:40:27 +00:00
Hanefi Onaldi 0750cc3a8e
Bump Citus version to 9.5.10 2021-11-08 16:52:56 +03:00
Hanefi Onaldi ac8285f9e0
Add changelog entries for 9.5.10
(cherry picked from commit 7b63edfc83)
2021-11-08 16:51:09 +03:00
Hanefi Onaldi 27ef29a981
Bump Citus version to 9.5.9 2021-11-08 15:21:02 +03:00
Hanefi Onaldi 62ea10989c
Add changelog entries for 9.5.9
(cherry picked from commit 3d49cbf9ab)
2021-11-08 14:14:01 +03:00
Nils Dijk 8f6cbb2d6b
reinstate optimization that got unintentionally broken in 366461ccdb (#5418)
DESCRIPTION: Reinstate optimisation for uniform shard interval ranges

During a refactor introduced in #4132 the following change was made, which made the optimisation in `CalculateUniformHashRangeIndex` unreachable: 
366461ccdb (diff-565a339ed3c78bc5a0d4ffeb4e91032150b1dffbeeff59cd3e65981d20b998c7L319-R319)

This PR reinstates the path to the optimisation!
2021-11-05 13:08:42 +01:00
Sait Talha Nisanci 64a9baffbd Adjust tests for 9.5 2021-11-05 13:08:11 +03:00
Sait Talha Nisanci 52631ea0fc Fix missing from entry
(cherry picked from commit a0e0759f73)
2021-11-05 13:08:11 +03:00
Onder Kalaci 53fbe96399 Deparse/parse the local cached queries
With local query caching, we try to avoid deparse/parse stages as the
operation is too costly.

However, we can do deparse/parse operations once per cached queries, right
before we put the plan into the cache. With that, we avoid edge
cases like (4239) or (5038).

In a sense, we are making the local plan caching behave similar for non-cached
local/remote queries, by forcing to deparse the query once.

(cherry picked from commit 69ca943e58)
2021-11-05 13:08:11 +03:00
Marco Slot 70fcddc0cb Fixes a crash in queries with a modifying CTE and a SELECT without FROM
(cherry picked from commit 58f85f55c0)
2021-11-05 13:08:11 +03:00
Marco Slot a875449b60 Run subquery_prepared_statements by itself
(cherry picked from commit ecbc1ab008)
2021-10-27 11:12:25 +02:00
SaitTalhaNisanci f9245510bc Run pg12 and pg13 separately (#4352)
It seems that sometimes we get `too many clients errors` with this set
of parallel tests, hence two of them are separated.

(cherry picked from commit 8c3dd6338e)
2021-10-27 11:12:25 +02:00
Sait Talha Nisanci d7a4dc8aae Replace workerNodeCount -> nodeCount
(cherry picked from commit ff82e85ea2)
2021-10-27 09:54:43 +02:00
Sait Talha Nisanci c908bad0e2 Set previous cell inside a for loop
(cherry picked from commit eb5be579e3)
2021-10-27 09:54:43 +02:00
Sait Talha Nisanci 3aee6aa494 Remove unused method
(cherry picked from commit 9ba3f70420)
2021-10-27 09:54:43 +02:00
Sait Talha Nisanci 2cf172fd27 Consider coordinator in intermediate result optimization
It seems that we were not considering the case where coordinator was
added to the cluster as a worker in the optimization of intermediate
results.

This could lead to errors when coordinator was added as a worker.

(cherry picked from commit 24e60b44a1)
2021-10-27 09:54:43 +02:00
Ahmet Gedemenli 213a5d746d
Fixes a bug preventing INSERT SELECT .. ON CONFLICT with a constraint name on local shards
Separate search relation shard function

Add tests

(cherry picked from commit a64dc8a72b)
2021-10-22 11:38:05 +03:00
Hanefi Onaldi 9ffef77288
Missing v in changelogs 2021-09-17 20:23:00 +03:00
Hanefi Onaldi b3dd39bf82
Bump Citus version to 9.5.8 2021-09-15 19:32:15 +03:00
Hanefi Onaldi a62e046646
Add changelog entries for 9.5.8
(cherry picked from commit 92af115f21)
2021-09-15 19:31:28 +03:00
Marco Slot ad79a5e080 Small fix to PG12 compatibility 2021-09-10 14:37:21 +02:00
Marco Slot be9fc69923 Avoid switch to superuser in worker_merge_files_into_table 2021-09-10 13:29:13 +02:00
Marco Slot e5e962b9b6 Add worker_append_table_to_shard permissions tests 2021-09-10 13:29:13 +02:00
Marco Slot fcd27a48c3 Perform copy command as regular user in worker_append_table_to_shard 2021-09-10 13:29:10 +02:00
Onur Tirtir 963bf8559c Backport missing pieces of 4a2dde4612
Sorry, I forgot to reflect the changes done in alter_table.c to
create_distributed_table.c when backporting
35043c56f1.
2021-09-08 16:33:33 +03:00
Onur Tirtir 355a774087 Not read heaptuple after closing pg_rewrite (#5255)
(cherry picked from commit cc49e63222)
2021-09-08 16:01:16 +03:00
Ahmet Gedemenli 4a2dde4612 Fix dropping materialized views while doing alter table
(cherry picked from commit 35043c56f1)

 Conflicts:
	src/backend/distributed/commands/alter_table.c
	src/test/regress/expected/alter_distributed_table.out
	src/test/regress/expected/alter_distributed_table_0.out
	src/test/regress/expected/alter_table_set_access_method.out
	src/test/regress/sql/alter_distributed_table.sql
	src/test/regress/sql/alter_table_set_access_method.sql
2021-09-08 16:01:09 +03:00
Hanefi Onaldi 209049006c
Bump Citus version to 9.5.7 2021-08-16 17:51:46 +03:00
Hanefi Onaldi a1633ed969
Add changelog entries for 9.5.7
(cherry picked from commit 41b15d8775)
2021-08-16 17:50:34 +03:00
Onder Kalaci d052c19cd8 Guard against hard WaitEvenSet errors
In short, add wrappers around Postgres' AddWaitEventToSet() and
ModifyWaitEvent().

AddWaitEventToSet()/ModifyWaitEvent*() may throw hard errors. For
example, when the underlying socket for a connection is closed by
the remote server and already reflected by the OS, however
Citus hasn't had a chance to get this information. In that case,
if replication factor is >1, Citus can failover to other nodes
for executing the query. Even if replication factor = 1, Citus
can give much nicer errors.

So CitusAddWaitEventSetToSet()/CitusModifyWaitEvent() simply puts
AddWaitEventToSet()/ModifyWaitEvent() into a PG_TRY/PG_CATCH block
in order to catch any hard errors, and returns this information to
the caller.
2021-08-10 09:47:08 +02:00
Onder Kalaci fc2272c6bd Adjust the tests to earlier versions
- Drop PRIMARY KEY for Citus 10 compatibility
- Drop columnar for PG 12
- Do not start/stop metadata sync as stop is not implemented in 10.1
- PG 11 parallel query changes explain outputs
2021-08-06 16:47:11 +02:00
Onder Kalaci aeca7b1868 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.

(cherry picked from commit 32124efd83)
2021-08-06 16:46:52 +02:00
naisila 74a58270db Bump use of new sql function 2021-08-03 16:45:23 +03:00
naisila edfa976cc8 Fix master_update_table_statistics scripts for 9.5 2021-08-03 16:45:23 +03:00
naisila daf85c6923 Fix master_update_table_statistics scripts for 9.4 2021-08-03 16:45:23 +03:00
naisila 7f11a59863 Reimplement master_update_table_statistics to detect dist. deadlocks
(ALL CODE BORROWED from commit 2f30614fe3)
2021-08-03 16:45:23 +03:00
Onur Tirtir b9df44742f Remove fkey graph visited flags & rework GetConnectedListHelper (#4446)
With this commit, we remove visited flags from ForeignConstraintRelationshipNode
struct since keeping local state in global object is both dangerous and
meaningless.

Also to improve readability, this commit also converts needless recursion to
iterative DFS to avoid passing local hash-map as another parameter to
GetConnectedListHelper function.
(cherry picked from commit 0db21bbe14)
2021-08-03 16:45:23 +03:00
Onur Tirtir 928cee6af6 Refactor foreign_key_relationship.c (#4438)
(cherry picked from commit 3f60b08b11)
2021-08-03 16:45:23 +03:00
naisila 27d74f1540 Add OpenConnectionToNodes and functions that generate shard queries
(ALL CODE BORROWED from commit 724d56f949)
2021-08-03 16:45:23 +03:00
Hanefi Onaldi a529866f93
Bump Citus version to 9.5.6 2021-07-08 15:38:42 +03:00
Hanefi Onaldi 2efbd6e21a
Add changelog entry for 9.5.6
(cherry picked from commit a8a632269af6a276c92bc4852a0c87f0e6467fb3)
2021-07-08 15:38:42 +03:00
Nils Dijk 3e2257fe8f fix 9.5-2 upgrade script to adhere to idempotency 2021-07-08 12:25:18 +02:00
Nils Dijk 2e0f9cff59 Add test for idempotency of citus_prepare_pg_upgrade 2021-07-08 12:25:18 +02:00