v.22.6Improvement

Added ProfileEvents for Introspection of Inserted and Merged Parts in system.part_log

Added ProfileEvents for introspection of type of written (inserted or merged) parts (Inserted{Wide/Compact/InMemory}Parts, MergedInto{Wide/Compact/InMemory}Parts. Added column part_type to system.part_log. Resolves #37495. #37536 (Anton Popov).
Introduced new ProfileEvents to monitor the types of parts written during inserts or merges, including Inserted{Wide/Compact/InMemory}Parts and MergedInto{Wide/Compact/InMemory}Parts. Added a new part_type column to the system.part_log table for enhanced introspection of part types.

Why it matters

This feature enables detailed tracking and introspection of the types of data parts that are inserted or merged in ClickHouse. It helps users understand the internal behavior of data part handling, improving observability and diagnosis of storage and insertion patterns.

How to use it

Users can monitor ProfileEvents related to part writing types by querying system metrics. Additionally, they can query the updated system.part_log table, which now includes the part_type column, to gain insights into what kind of parts were processed during insert or merge operations.