Summary:
This change adds support for TRUNCATE TABLE in Automatic mode xCluster (DDL replication) by enabling the `TRUNCATE TABLE` TAG in the ddl trigger filter.
In order to not break backwards compatibility the TAG has to be explicitly specified on the `ddl_command_start` and `ddl_command_end` triggers.
`ExecuteTruncate` has been moved from `standard_ProcessUtility` to `ProcessUtilitySlow`, and it now sets the list of `relids` that were truncated by it.
`yb_skip_data_insert_for_xcluster_target` has been renamed to `yb_xcluster_automatic_mode_target_ddl`. When this is enabled, we skip sequence restarts since these are independently replicated via the `sequence_data` table with the correct HT. Resetting the sequence at the time the DDL is run on the target would override the replicated data, which can be higher than the reset number.
`yb_xcluster_automatic_mode_target_ddl` is also used to skip `InsertIntoReplicatedDDLs` in `HandleTargetDDLEnd`, which enables temp table DDLs on the target without the need to set `enable_manual_ddl_replication`.
A new `data_only` check has been added to `XClusterPgRegressDDLReplicationTest` in order to run a regression test and validate the new feature.
**Upgrade/Rollback safety:**
New event triggers `yb_xcluster_ddl_replication_handle_truncate_start_trigger` and `yb_xcluster_ddl_replication_handle_truncate_end_trigger` have been added to the xCluster replication extension. This has been intentionally done without any upgrade step.
Any customer using DDL extension on a version before this change that requires support for TRUNCATE is required to drop and recreate xCluster, or manually add the new triggers.
`yb_skip_data_insert_for_xcluster_target` has been renamed to `yb_xcluster_dd_extension_target_executing`, but this is safe since the xCluster poller which uses it performs a local pg connection, which ensures both are on the same version.
Jira: DB-12858
Test Plan:
TEST_F(XClusterDDLReplicationTableRewriteTest, TruncateTable) {
TEST_P(XClusterPgRegressDDLReplicationParamTest, PgRegressTruncateTable) {
yb_triggers_schedule
Reviewers: jhe, mlillibridge, myang
Reviewed By: jhe, mlillibridge, myang
Subscribers: ybase, yql
Differential Revision: https://phorge.dev.yugabyte.com/D45194