cloudberry icon indicating copy to clipboard operation
cloudberry copied to clipboard

WIP: Cherry-pick jsonlog implementation from PostgreSQL 15

Open JustinSongXh opened this issue 7 months ago • 2 comments

Corresponding to issue #1119

What does this PR do?

Type of Change

  • [ ] Cherry-pick JSON log format implementation from PostgreSQL 15.
  • [ ] Adapt JSON log fields, to be consistent with CSV log fields.
  • [ ] Support both gp_log_format and log_destination JSON config.

Impact

Performance: IO burden would increase if user want to write log both in CSV and JSON format.

User-facing changes: Enable GUC argument log_destination defunct by Greenplum. Users can change log format either using log_destination or gp_log_format, which would be confusing.

Checklist


JustinSongXh avatar May 22 '25 06:05 JustinSongXh

Hey @JustinSongXh, There is a proposal related to upgrading the PG14 to PG16. Perhaps your work can be a part of this proposal: https://github.com/apache/cloudberry/discussions/1095.

tuhaihe avatar May 22 '25 06:05 tuhaihe

In CBDB, we also have a set of functions to read CBDB log files using SQL queries.

They use a CSV parser to read external data https://github.com/apache/cloudberry/blob/main/gpcontrib/gp_toolkit/gp_toolkit--1.3.sql#L168. If we change the log format, we will also need to change the procedure for reading logs.

leborchuk avatar Jun 02 '25 10:06 leborchuk