mirror of https://github.com/citusdata/citus.git
This pull request addresses Issue #7846, where specific MERGE queries on
non-distributed and distributed tables can result in crashes in certain
scenarios. The issue stems from the usage of `pg_class` catalog table,
and the `FilterShardsFromPgclass` function in Citus. This function goes
through the query's jointree to hide the shards. However, in PG17,
MERGE's join quals are in a separate structure called
`mergeJoinCondition`. Therefore FilterShardsFromPgclass was not
filtering correctly in a `MERGE` command that involves `pg_class`. To
fix the issue, we handle `mergeJoinCondition` separately in PG17.
Relevant PG commit:
|
||
|---|---|---|
| .. | ||
| task_tracker_protocol.c | ||
| worker_create_or_replace.c | ||
| worker_data_fetch_protocol.c | ||
| worker_drop_protocol.c | ||
| worker_partition_protocol.c | ||
| worker_shard_visibility.c | ||
| worker_sql_task_protocol.c | ||
| worker_truncate_trigger_protocol.c | ||