Summary:
Original commit: fc99639babfd4716cfccf06e0f6fe992d56a664b / D40593
During pg15 major upgrade we want to block all DDLs, except create and drop of temp tables.
This change adds the capability for pg to inform yb-master when it is performing a DDL that is safe to execute even when catalog modifications are blocked.
New guc `yb_force_catalog_update_on_next_ddl` has also been introduced as a safety mechanism to make the next DDL to run with force catalog update mode. If whitelist of any common safe DDL has been missed, this provides the capability to change the client app and not having to force yet another pg11 minor version upgrade (aka 2024.2.x).
Merge conflicts:
- Some minor conflicts that were auto merged with vs code.
- tablecmds.c:1496 Replaced `table_open` with `heap_open`
- tablecmds.c:1499 Replaced `table_open` with `heap_open`
- Code in `PgDmlWrite::Prepare` has been moved to identical function `PgDmlWrite::AllocWriteRequest`
** Upgrade/Downgrade safety: **
Optional new proto field is only set and not read by any service in 2024.2 versions making this upgrade safe.
Jira: DB-13812
Test Plan: ysql_ddl_whitelist-test
Reviewers: smishra, telgersma, fizaa
Reviewed By: telgersma
Subscribers: yql, ybase
Differential Revision: https://phorge.dev.yugabyte.com/D40680