mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
commit
0cab773e7b
@ -719,6 +719,36 @@ def test_too_many_parts(started_cluster):
|
||||
pg_manager2.drop_materialized_db()
|
||||
|
||||
|
||||
def test_toast(started_cluster):
|
||||
table = "test_toast"
|
||||
pg_manager.execute(
|
||||
f"CREATE TABLE {table} (id integer PRIMARY KEY, txt text, other text)"
|
||||
)
|
||||
pg_manager.create_materialized_db(
|
||||
ip=started_cluster.postgres_ip,
|
||||
port=started_cluster.postgres_port,
|
||||
settings=[
|
||||
f"materialized_postgresql_tables_list = '{table}'",
|
||||
"materialized_postgresql_backoff_min_ms = 100",
|
||||
"materialized_postgresql_backoff_max_ms = 100",
|
||||
],
|
||||
)
|
||||
|
||||
pg_manager.execute(
|
||||
f"""\
|
||||
INSERT INTO {table} (id, txt)\
|
||||
VALUES (1, (SELECT array_to_string(ARRAY(SELECT chr((100 + round(random() * 25)) :: integer) FROM generate_series(1,30000) as t(i)), '')))
|
||||
"""
|
||||
)
|
||||
|
||||
check_tables_are_synchronized(
|
||||
instance,
|
||||
table,
|
||||
postgres_database=pg_manager.get_default_database(),
|
||||
order_by="id",
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cluster.start()
|
||||
input("Cluster created, press any key to destroy...")
|
||||
|
Loading…
Reference in New Issue
Block a user