citusdata / citusdata/citus

Use postgres 12's support functions for function row/cost estimation

Open
#3,313 1 comment 0 reactions 0 assignees View on GitHub
performance technical debt
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

Currently we use the planner hook to adjust the cost for functions like `read_intermediate_result`. Postgres 12 [added](https://www.postgresql.org/docs/12/sql-createfunction.html) `SUPPORT support_function` syntax to `CREATE FUNCTION` with which we can provide cost/row estimation functions to postgres. See postgres'[ `src/include/nodes/supportnodes.h`](https://github.com/postgres/postgres/blob/REL_12_STABLE/src/include/nodes/supportnodes.h).

This syntax is not available in postgres 11, so we should probably wait until Citus support for postgres 11 is dropped.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.