Commit Graph

3205 Commits (690276c51621c15c6ecc2a25dfd184e663d7633b)

Author SHA1 Message Date
gindibay 690276c516 Fixes indentation 2023-10-23 12:35:53 +03:00
gindibay ea0a908702 Fixes pg_dist_objects record in coordinators 2023-10-23 12:31:25 +03:00
gindibay dad81042a5 Adds undistribute sql 2023-10-23 10:01:18 +03:00
gindibay 1e91b144e2 Fixed review issues 2023-10-14 20:49:26 +03:00
gindibay c6d1ef9e41 Rollbacks enable_create_database_propagation 2023-10-14 20:19:18 +03:00
gindibay 674fd3226c Sets enable_create_database_propagation true 2023-10-14 19:50:32 +03:00
gindibay 3a6fdada11 Changes if to switch statements 2023-10-14 05:35:34 +03:00
gindibay ca5e234821 Adds EnableCreateDatabasePropagation for drop db 2023-10-13 14:17:14 +03:00
gindibay abf9dd9e59 Adds EnableCreateDatabasePropagation check 2023-10-13 14:17:14 +03:00
gindibay 333f77a267 Fixes distributed_object management 2023-10-13 14:17:14 +03:00
gindibay c31479d2eb Fixes review notes 2023-10-13 14:17:14 +03:00
gindibay a274ffcb51 Adds If exists statement for drop database 2023-10-13 14:17:14 +03:00
gindibay 8cc67921cb Fixes review comments 2023-10-13 14:17:14 +03:00
gindibay 875f347238 Fixes indentation 2023-10-13 14:17:14 +03:00
gindibay f2092d2f44 Clarifies the code 2023-10-13 14:17:14 +03:00
gindibay 7bdeb2f866 Fixes indentation 2023-10-13 14:17:14 +03:00
gindibay fb6dd413ad Fixes PostprocessCreateDatabaseStmt comment 2023-10-13 14:17:14 +03:00
gindibay d88a1e7785 Fixes compile error 2023-10-13 14:17:14 +03:00
gindibay d0ef13dc89 Fixes review comments 2023-10-13 14:17:14 +03:00
gindibay 480c22acc2 Fixes the comment 2023-10-13 14:17:14 +03:00
gindibay d778bb1ed6 Adds PG_VERSION_15 constant 2023-10-13 14:17:14 +03:00
gindibay d46a8394a3 Fixes compile error 2023-10-13 14:17:14 +03:00
gindibay df715a0402 Fixes indent 2023-10-13 14:17:14 +03:00
gindibay 134ec8f428 Fixes compile error for PG 14 2023-10-13 14:17:14 +03:00
gindibay 6096a0ed57 Adds missing types 2023-10-13 14:17:14 +03:00
gindibay e7f8058016 Removes T_Boolean since it breaks pg14 compile 2023-10-13 14:17:14 +03:00
gindibay 82358fb37d Fixes indentation 2023-10-13 14:17:13 +03:00
gindibay 0bf1c2c139 Refactors the code to make more managable 2023-10-13 14:17:13 +03:00
gindibay 94abb07409 Fixes indentation 2023-10-13 14:17:13 +03:00
gindibay 1f578791bb Fixes pg_dist_object delete problem 2023-10-13 14:17:13 +03:00
gindibay a5e0b9411a Adds tests for create and drop database 2023-10-13 14:17:13 +03:00
gindibay 5c50d58757 Changes EnableCreateDatabasePropagation to false
to fix failing tests
2023-10-13 14:17:13 +03:00
gindibay 3735bef156 Fixes sql comments 2023-10-13 14:17:13 +03:00
gindibay cef9ac702e Fixes indentation 2023-10-13 14:17:13 +03:00
gindibay 1e7c18cb61 Removes unnecessary code 2023-10-13 14:17:13 +03:00
gindibay 40893e6ffc Removes unnecessary files 2023-10-13 14:17:13 +03:00
gindibay eb1f093381 Fixes runtime and compile errors 2023-10-13 14:17:13 +03:00
gindibay ca36833b5c Fix for Pg16 compile error 2023-10-13 14:16:43 +03:00
gindibay bd398a627b Fixes compile errors 2023-10-13 14:16:43 +03:00
gindibay 39cb7977ce Fixes additional compile errors 2023-10-13 14:16:43 +03:00
gindibay 0d5c2f9350 Adds first commit 2023-10-13 14:16:43 +03:00
Emel Şimşek e9035f6d32
Send keepalive messages in split decoder periodically to avoid wal receiver timeouts during large shard splits. (#7229)
DESCRIPTION: Send keepalive messages during the logical replication
phase of large shard splits to avoid timeouts.

During the logical replication part of the shard split process, split
decoder filters out the wal records produced by the initial copy. If the
number of wal records is big, then split decoder ends up processing for
a long time before sending out any wal records through pgoutput. Hence
the wal receiver may time out and restarts repeatedly causing our split
driver code catch up logic to fail.

Notes: 

1. If the wal_receiver_timeout is set to a very small number e.g. 600ms,
it may time out before receiving the keepalives. My tests show that this
code works best when the` wal_receiver_timeout `is set to 1minute, which
is the default value.

2. Once a logical replication worker time outs, a new one gets launched.
The new logical replication worker sets the pg_stat_subscription columns
to initial values. E.g. the latest_end_lsn is set to 0. Our driver logic
in `WaitForGroupedLogicalRepTargetsToCatchUp` can not handle LSN value
to go back. This is the main reason for it to get stuck in the infinite
loop.
2023-10-09 22:33:08 +03:00
Nils Dijk 6d8725efb0
Fix leaking of memory and memory contexts in Foreign Constraint Graphs (#7236)
DESCRIPTION: Fix leaking of memory and memory contexts in Foreign
Constraint Graphs

Previously, every time we (re)created the Foreign Constraint
Relationship Graph, we created a new Memory Context while loosing a
reference to the previous context. This old context could still have
left over memory in there causing a memory leak.

With this patch we statically have one memory context that we lazily
initialize the first time we create our foreign constraint relationship
graph. On every subsequent creation, beside destroying our previous
hashmap we also reset our memory context to remove any left over
references.
2023-10-09 13:05:51 +02:00
Onur Tirtir 858d99be33
Take improvement_threshold into the account in citus_add_rebalance_strategy() (#7247)
DESCRIPTION: Makes sure to take improvement_threshold into the account
in `citus_add_rebalance_strategy()`.

Fixes https://github.com/citusdata/citus/issues/7188.
2023-10-09 13:13:08 +03:00
Önder Kalacı 7d6c401dd3
Update technical readme (#7248)
Fix a wrong query, reported by @naisila
2023-10-06 13:37:37 +03:00
Önder Kalacı 0dca65c84d
Addd missing image to Technical Readme (#7243)
DESCRIPTION: PR description that will go into the change log, up to 78
characters
2023-09-29 22:24:10 +02:00
Önder Kalacı 185ac5e01e
Citus Technical Readme (#7207)
This commit aims to add a comprehensive guide that covers all essential
aspects of Citus, including planning, execution, locking mechanisms,
shard moves, 2PC, and many other major components of Citus.

Co-authored-by: Marco Slot <marco.slot@gmail.com>
2023-09-29 16:50:52 +03:00
Nils Dijk b87fbcbf79
Shard moves/isolate report LSN's in lsn format (#7227)
DESCRIPTION: Shard moves/isolate report LSN's in lsn format

While investigating an issue with our catchup mechanism on certain
postgres versions we noticed we print LSN's in the format of the native
long type. This is an uncommon representation for LSN's in postgres
logs.

This patch changes the output of our log message to go from the long
type representation to the native LSN type representation. Making it
easier for postgres users to recognize and compare LSN's with other
related reports.

example of new output:
```
2023-09-25 17:28:47.544 CEST [11345] LOG:  The LSN of the target subscriptions on node localhost:9701 have increased from 0/0 to 0/E1ED20F8 at 2023-09-25 17:28:47.544165+02 where the source LSN is 1/415DCAD0
```
2023-09-26 13:47:50 +02:00
Gürkan İndibay 7fa109c977
Adds alter user missing features (#7204)
DESCRIPTION: Adds alter user rename propagation and enriches alter user
tests

---------

Co-authored-by: Jelte Fennema <github-tech@jeltef.nl>
2023-09-26 12:28:07 +03:00
Onur Tirtir 111b4c19bc
Make sure to disallow creating a replicated distributed table concurrently (#7219)
See explanation in https://github.com/citusdata/citus/issues/7216.
Fixes https://github.com/citusdata/citus/issues/7216.

DESCRIPTION: Makes sure to disallow creating a replicated distributed
table concurrently
2023-09-25 11:14:35 +03:00