From d79ef0e59524a8f241312ad8ca9e555eaace6823 Mon Sep 17 00:00:00 2001 From: Kanthi Date: Sun, 8 Sep 2024 09:53:26 -0400 Subject: [PATCH] Update production_setup.md closes: #793 --- doc/production_setup.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/doc/production_setup.md b/doc/production_setup.md index cdda79e77..4a8c22f74 100644 --- a/doc/production_setup.md +++ b/doc/production_setup.md @@ -3,7 +3,8 @@ [Throughput & Memory Usage](#improving-throughput-and/or-memory-usage.) \ [Initial Load](#initial-load) \ -[PostgreSQL Setup](#postgresql-production-setup) +[PostgreSQL Setup](#postgresql-production-setup) \ +[ClickHouse Setup](#clickhouse-setup) ### Improving throughput and/or Memory usage. ![](img/production_setup.jpg) @@ -70,7 +71,28 @@ By setting the `single.threaded: true` configuration variable in `config.yml`, t and will insert batches directly from the debezium queue. This mode will work on lower memory setup but will increase the replication speed. +## ClickHouse Setup +The clickhouse user needs to have the following GRANTS to the +offset storage/schema history database(database provided in `offset.storage.jdbc.` configuration variable. +and the database that is replicated(database provided in `database.include.list` and `table.include.list`) + +The following example creates user `sink` with necessary GRANTS +to the offset storage/schema history database and replicated databases. +``` +ALTER SETTINGS PROFILE 'ingest' SETTINGS + deduplicate_blocks_in_dependent_materialized_views=1, + min_insert_block_size_rows_for_materialized_views=10000, + throw_on_max_partitions_per_insert_block=0, + max_partitions_per_insert_block=1000, + date_time_input_format='best_effort'; + +CREATE USER OR REPLACE 'sink' IDENTIFIED WITH sha256_hash BY '' HOST IP '::/8' SETTINGS PROFILE 'ingest'; +grant SELECT, INSERT, CREATE TABLE, CREATE DATABASE on altinity.* to sink; +grant CLUSTER ON *.* to sink; +grant SELECT, INSERT, CREATE TABLE, TRUNCATE on replicated_db.* to sink; +``` + ## PostgreSQL Production Setup One of the common problems with PostgreSQL is the WAL size increasing. -[Handling PostgreSQL WAL Growth with Debezium Connectors](doc/postgres_wal_growth.md) \ No newline at end of file +[Handling PostgreSQL WAL Growth with Debezium Connectors](doc/postgres_wal_growth.md)