Remove inert GUC citus.enable_outer_joins_with_pseudoconstant_quals_pre_pg17 in 15.1
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
Follow-up to #8750 (dropping PG16 support).
When PG16 support is dropped in 15.0, the GUC `citus.enable_outer_joins_with_pseudoconstant_quals_pre_pg17` becomes a no-op: the only code path it gated (`ShouldRecursivelyPlanOuterJoins` in `recursive_planning.c`, guarded by `#if PG_VERSION_NUM < PG_VERSION_17`) is removed along with PG16.
Removing the GUC outright in 15.0 would break startup for anyone who still has it in `postgresql.conf` or set via `ALTER SYSTEM` / `ALTER DATABASE ... SET`. So in 15.0 it is left **defined but inert**, with:
- a rewritten description stating it has no effect and will be removed, and
- a `WarnIfDeprecatedPseudoconstantQualsGucIsSet` check hook that emits a `WARNING` (`ERRCODE_WARNING_DEPRECATED_FEATURE`) whenever the GUC is set from any source other than `PGC_S_DEFAULT`.
That gives users a full release cycle of warnings before the setting disappears.
## Remove in 15.1
- `src/backend/distributed/shared_library_init.c`
- the `DefineCustomBoolVariable` block for `citus.enable_outer_joins_with_pseudoconstant_quals_pre_pg17`
- the `WarnIfDeprecatedPseudoconstantQualsGucIsSet` check hook and its forward declaration
- `src/backend/distributed/planner/recursive_planning.c` — `bool EnableOuterJoinsWithPseudoconstantQualsPrePG17` definition
- `src/include/distributed/recursive_planning.h` — the `extern` declaration
- Any regression test or expected output that sets or reports the GUC
Also confirm `hasPseudoconstantQuals()` and `IsOuterJoinExpr()` have no remaining callers once the PG16 error path is gone, and drop them if they are dead.
## Note for the release
Because this is a user-visible setting going away, it should get a line in the 15.1 changelog / release notes, not just a silent deletion.
Contributor guide
Research direction
Start by inspecting the GUC definition and hook in src/backend/distributed/shared_library_init.c, then trace the declarations and definitions in recursive_planning.c and recursive_planning.h. Search regression tests and expected output for the setting, and check callers of hasPseudoconstantQuals() and IsOuterJoinExpr(). Done means the obsolete code and test references are removed, relevant tests pass, and the 15.1 release notes mention the setting removal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100