WIP: Cherry-pick jsonlog implementation from PostgreSQL 15
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
- [ ] Followed contribution guide
- [ ] Added/updated documentation
- [ ] Reviewed code for security implications
- [ ] Requested review from cloudberry committers
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.
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.