v.22.5Experimental Feature

Improvement: SYSTEM SYNC DATABASE REPLICA Query for Replicated Databases

Improvement for replicated databases: Added SYSTEM SYNC DATABASE REPLICA query which allows to sync tables metadata inside Replicated database, because currently synchronisation is asynchronous. #35944 (Nikita Mikhaylov).
Added a new SYSTEM SYNC DATABASE REPLICA query to enable synchronous metadata synchronization of tables within replicated databases in ClickHouse.

Why it matters

This feature addresses the asynchronous nature of metadata synchronization in replicated databases, allowing users to explicitly synchronize table metadata across replicas on demand to ensure consistency and up-to-date schema information.

How to use it

Execute the following query to synchronously synchronize the metadata of all tables in a replicated database:

SYSTEM SYNC DATABASE REPLICA <database_name>