v.23.2Improvement

add SYSTEM SYNC FILE CACHE command to execute sync syscall

add SYSTEM SYNC FILE CACHE command. It will do the sync syscall. #8921. #45685 (DR).
Introduces the SYSTEM SYNC FILE CACHE command which performs the sync system call to flush file system buffers to disk.

Why it matters

This feature addresses the need to manually ensure that cached file system data is flushed to persistent storage. It helps users maintain data durability and consistency by forcing synchronization between memory and disk, which can be crucial for certain operational or maintenance tasks.

How to use it

Users can execute the command directly in ClickHouse as:

SYSTEM SYNC FILE CACHE


This will invoke the underlying sync syscall to flush all cached file system data to disk.