Commit Graph

295 Commits

Author SHA1 Message Date
Kseniia Sumarokova
045ecdf71f
Update src/Storages/PostgreSQL/MaterializedPostgreSQLConsumer.cpp
Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
2023-07-20 19:03:06 +02:00
Kseniia Sumarokova
500f1e6757
Follow up to #49698 2023-07-20 18:55:41 +02:00
kssenii
353b0f817a Merge remote-tracking branch 'origin/fix-pg-sync-tables-exception-broken-sync' into fix-pg-sync-tables-exception-broken-sync 2023-07-18 12:26:17 +02:00
kssenii
0cfd12aba4 Fix 2023-07-18 12:24:04 +02:00
kssenii
383fc06761 Fix 2023-05-09 16:10:53 +02:00
Alexander Tokmakov
83b12ec5ca replace NO DELAY with SYNC in tests 2023-05-03 20:08:49 +02:00
Azat Khuzhin
79b83c4fd2 Remove superfluous includes of logger_userful.h from headers
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-10 17:59:30 +02:00
Alexander Tokmakov
48b23dd012
Fix race between DROP MatView and RESTART REPLICAS (#47863)
* fix race between drop mv and restart replicas

* unrelated: fix bad exception messages

* fix test

* fix

* fix

* fix

* fix

* fix test

* fix

* fix test

* Update 02437_drop_mv_restart_replicas.sh

* fix tests
2023-04-01 15:26:00 +03:00
Alexey Milovidov
614be6f718
Merge pull request #47387 from sippy/pg_select_from_only
Use "SELECT * FROM ONLY xyz", not "SELECT * FROM xyz" while replicating
2023-03-30 22:57:57 +03:00
kssenii
943a4f75f8 Catch all exceptions to avoid replication stuck 2023-03-28 12:00:56 +02:00
Maksym Sobolyev
6885863564 Use "SELECT FROM ONLY xyz", not "SELECT FROM xyz" while replicating
postgresql tables, to properly handle inherited tables. Currently,
it would fetch same data twice - once from the child tables and then
from the parent table.
2023-03-08 16:18:13 -08:00
Mike Kot
9920a52c51 use std::lerp, constexpr hex.h 2023-03-07 22:50:17 +00:00
kssenii
80a0aa1327 Merge remote-tracking branch 'upstream/master' into return-materialized-postrgesql-tests-back 2023-02-20 14:37:39 +01:00
Maksim Kita
6dffe52e68
Merge pull request #46471 from kitaisreal/analyzer-planner-fixes-before-enable-by-default
Analyzer planner fixes before enable by default
2023-02-19 13:49:18 +03:00
kssenii
417052e4b2 Fix remaining tests 2023-02-16 18:56:19 +01:00
kssenii
75d62ee24a Remove support of feature which does not work reliably 2023-02-16 16:41:31 +01:00
Maksim Kita
b72ea982b0 Remove unnecessary includes of InterpreterSelectQuery header 2023-02-16 12:17:03 +01:00
Nikolay Degterinsky
d8c5c7c503
Merge branch 'master' into parameters-rename-query 2023-02-16 11:30:20 +01:00
Nikolay Degterinsky
6e4b660033 Move MongoDB and PostgreSQL sources to Sources folder 2023-02-14 22:35:10 +00:00
Nikolay Degterinsky
b9d3160107 Add parameterized RENAME queries 2023-02-14 13:01:06 +00:00
Antonio Andelic
85cfee4bb9 Better alias definition 2023-02-01 13:54:03 +00:00
Antonio Andelic
ec04cf6876 Merge branch 'master' into add-support-for-settings-alias 2023-02-01 09:01:01 +00:00
Antonio Andelic
714fad1529 Add support for settings alias 2023-01-26 14:06:46 +00:00
Alexander Tokmakov
bb4c8e169f check number of parameters in format string 2023-01-23 23:16:16 +01:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
Azat Khuzhin
4e76629aaf Fixes for -Wshorten-64-to-32
- lots of static_cast
- add safe_cast
- types adjustments
  - config
  - IStorage::read/watch
  - ...
- some TODO's (to convert types in future)

P.S. That was quite a journey...

v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Robert Schulze
fd86829824
Consolidate config_core.h into config.h
Less duplication, less confusion ...
2022-09-28 13:31:57 +00:00
Antonio Andelic
e64436fef3 Fix typos with new codespell 2022-09-02 08:54:48 +00:00
Kseniia Sumarokova
ba4dfe8308
Update MaterializedPostgreSQLConsumer.cpp 2022-08-25 00:23:59 +02:00
Kseniia Sumarokova
38c4094f89
Update MaterializedPostgreSQLConsumer.h 2022-08-24 12:25:03 +02:00
Kseniia Sumarokova
de9d254290
Update MaterializedPostgreSQLConsumer.cpp 2022-08-24 12:24:44 +02:00
Kseniia Sumarokova
4486f26d51
Update MaterializedPostgreSQLConsumer.cpp 2022-08-24 12:23:08 +02:00
Maksim Buren
0827e87d45
delete miss log 2022-08-23 14:20:32 +03:00
maks-buren630501
b2b97e53ea Fix bug whith wrong postgresql answer 2022-08-23 14:13:16 +03:00
Kseniia Sumarokova
4711f57763
Update PostgreSQLReplicationHandler.cpp 2022-08-23 10:43:12 +02:00
Maksim Buren
9e54792359
Troubleshooting racing
consumer_task use replication_handler_initialized in thread start in method assertInitialized(), by this sometimes assertInitialized throw error because replication_handler_initialized was still "false".
2022-08-23 09:34:03 +03:00
kssenii
9f1d6814fc Fix 2022-07-15 18:01:54 +02:00
Alexander Tokmakov
7c37079a96 Merge branch 'master' into deprecate_ordinary_database 2022-06-27 14:46:59 +02:00
kssenii
bc9b56096f Fix 2022-06-23 21:52:57 +02:00
Alexander Tokmakov
2c5a88faba deprecate Ordinary database 2022-06-23 10:20:14 +02:00
Nikolai Kochetov
56feef01e7 Move some resources 2022-05-20 19:49:31 +00:00
Robert Schulze
777b5bc15b
Don't let storages inherit from boost::noncopyable
... IStorage has deleted copy ctor / assignment already
2022-05-03 09:07:08 +02:00
Robert Schulze
330212e0f4
Remove inherited create() method + disallow copying
The original motivation for this commit was that shared_ptr_helper used
std::shared_ptr<>() which does two heap allocations instead of
make_shared<>() which does a single allocation. Turned out that
1. the affected code (--> Storages/) is not on a hot path (rendering the
performance argument moot ...)
2. yet copying Storage objects is potentially dangerous and was
   previously allowed.

Hence, this change

- removes shared_ptr_helper and as a result all inherited create() methods,

- instead, Storage objects are now created using make_shared<>() by the
  caller (for that to work, many constructors had to be made public), and

- all Storage classes were marked as noncopyable using boost::noncopyable.

In sum, we are (likely) not making things faster but the code becomes
cleaner and harder to misuse.
2022-05-02 08:46:52 +02:00
Amos Bird
4a5e4274f0
base should not depend on Common 2022-04-29 10:26:35 +08:00
Robert Schulze
b24ca8de52
Fix various clang-tidy warnings
When I tried to add cool new clang-tidy 14 warnings, I noticed that the
current clang-tidy settings already produce a ton of warnings. This
commit addresses many of these. Almost all of them were non-critical,
i.e. C vs. C++ style casts.
2022-04-20 10:29:05 +02:00
kssenii
846faa51d8 Fix bug 2022-04-06 14:35:19 +02:00
kssenii
c4832f7633 Fix 2022-03-28 09:28:02 +02:00
Anton Popov
0ba78c3c3a Merge remote-tracking branch 'upstream/master' into HEAD 2022-03-16 15:28:09 +00:00
Maksim Kita
2fdcf53a76 Fix clang-tidy warnings in Server, Storages folders 2022-03-14 18:17:35 +00:00
Anton Popov
36ec379aeb Merge remote-tracking branch 'upstream/master' into HEAD 2022-03-14 16:28:35 +00:00