{"kind": "hook", "major": "18", "item": {"slug": "joinrel_setup_hook", "name": "joinrel_setup_hook", "name_zh": "joinrel_setup_hook", "category": "Query planning", "summary": "Not recorded in the selected version.", "aliases": [], "versions": {"19": {"facts": [{"label": "Interface type", "value": "joinrel_setup_hook_type"}, {"label": "Header", "value": "src/include/optimizer/pathnode.h"}, {"label": "Subsystem", "value": "Query planning"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/19/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "REL_19_BETA4", "label": "19 Beta 4", "major": "19", "channel": "preview", "revision": "b73d13c32c834a2c8e1c60cb92f79530376cedf1"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/b73d13c32c834a2c8e1c60cb92f79530376cedf1/src/include/optimizer/pathnode.h#L42", "path": "src/include/optimizer/pathnode.h", "label": "Interface declaration", "sha256": "7f5594bdaa1a3cd656ab9a8174fc3ba3d1b25ddf79773e5f8063b939413d1fd9"}, {"url": "https://github.com/postgres/postgres/blob/b73d13c32c834a2c8e1c60cb92f79530376cedf1/src/backend/optimizer/util/relnode.c#L54", "path": "src/backend/optimizer/util/relnode.c", "label": "Core definition", "sha256": "dfd2d60bc2c491994252e13535d194cae43f43fc15128b5a1207dc3a04b10d8a"}, {"url": "https://github.com/postgres/postgres/blob/b73d13c32c834a2c8e1c60cb92f79530376cedf1/src/backend/optimizer/util/relnode.c#L984", "path": "src/backend/optimizer/util/relnode.c", "label": "Call sites", "sha256": "dfd2d60bc2c491994252e13535d194cae43f43fc15128b5a1207dc3a04b10d8a"}], "sections": [{"title": "Core source comments", "paragraphs": ["Allow a plugin to editorialize on the new joinrel's properties. Actions might include altering the size estimate, clearing consider_parallel, or adjusting pgs_mask.", "Allow a plugin to editorialize on the new joinrel's properties. Actions might include altering the size estimate, clearing consider_parallel, or adjusting pgs_mask. (However, note that clearing consider_parallel would be better done in the parent joinrel rather than here.)"]}, {"title": "Call sites", "paragraphs": ["src/backend/optimizer/util/relnode.c:984", "src/backend/optimizer/util/relnode.c:1145"]}, {"code": "\t/*\n\t * Allow a plugin to editorialize on the new joinrel's properties. Actions\n\t * might include altering the size estimate, clearing consider_parallel,\n\t * or adjusting pgs_mask.\n\t */\n\tif (joinrel_setup_hook)\n\t\t(*joinrel_setup_hook) (root, joinrel, outer_rel, inner_rel, sjinfo,\n\t\t\t\t\t\t\t   restrictlist);\n\n\t/* Store the partition information. */\n\tbuild_joinrel_partition_info(root, joinrel, outer_rel, inner_rel, sjinfo,\n\t\t\t\t\t\t\t\t restrictlist);\n\n\t/* Add the joinrel to the PlannerInfo. */\n\tadd_join_rel(root, joinrel);", "title": "Core call context: src/backend/optimizer/util/relnode.c:978\u2013992", "paragraphs": []}, {"code": "\t * Allow a plugin to editorialize on the new joinrel's properties. Actions\n\t * might include altering the size estimate, clearing consider_parallel,\n\t * or adjusting pgs_mask. (However, note that clearing consider_parallel\n\t * would be better done in the parent joinrel rather than here.)\n\t */\n\tif (joinrel_setup_hook)\n\t\t(*joinrel_setup_hook) (root, joinrel, outer_rel, inner_rel, sjinfo,\n\t\t\t\t\t\t\t   restrictlist);\n\n\t/* Is the join between partitions itself partitioned? */\n\tbuild_joinrel_partition_info(root, joinrel, outer_rel, inner_rel, sjinfo,\n\t\t\t\t\t\t\t\t restrictlist);\n\n\t/* We build the join only once. */\n\tAssert(!find_join_rel(root, joinrel->relids));", "title": "Core call context: src/backend/optimizer/util/relnode.c:1139\u20131153", "paragraphs": []}], "signature": "typedef void (*joinrel_setup_hook_type) (PlannerInfo *root, RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel, SpecialJoinInfo *sjinfo, List *restrictlist);\nextern PGDLLIMPORT joinrel_setup_hook_type joinrel_setup_hook;", "description": ["Hook for plugins to get control during joinrel setup"]}, "20": {"facts": [{"label": "Interface type", "value": "joinrel_setup_hook_type"}, {"label": "Header", "value": "src/include/optimizer/pathnode.h"}, {"label": "Subsystem", "value": "Query planning"}, {"label": "Initial value", "value": "NULL (no hook installed)"}], "related": [{"url": "/docs/devel/planner-optimizer.html", "label": "The Planner/Optimizer"}], "release": {"ref": "master", "label": "20 devel", "major": "20", "channel": "devel", "revision": "2c10c2ce4d7bcd57543a49ab402af02a39724e0a"}, "sources": [{"url": "https://github.com/postgres/postgres/blob/2c10c2ce4d7bcd57543a49ab402af02a39724e0a/src/include/optimizer/pathnode.h#L42", "path": "src/include/optimizer/pathnode.h", "label": "Interface declaration", "sha256": "7f5594bdaa1a3cd656ab9a8174fc3ba3d1b25ddf79773e5f8063b939413d1fd9"}, {"url": "https://github.com/postgres/postgres/blob/2c10c2ce4d7bcd57543a49ab402af02a39724e0a/src/backend/optimizer/util/relnode.c#L54", "path": "src/backend/optimizer/util/relnode.c", "label": "Core definition", "sha256": "e4d52530d522808857981ecf0b5943d10844732c06f18a4e4b2323afbd58b67d"}, {"url": "https://github.com/postgres/postgres/blob/2c10c2ce4d7bcd57543a49ab402af02a39724e0a/src/backend/optimizer/util/relnode.c#L1012", "path": "src/backend/optimizer/util/relnode.c", "label": "Call sites", "sha256": "e4d52530d522808857981ecf0b5943d10844732c06f18a4e4b2323afbd58b67d"}], "sections": [{"title": "Core source comments", "paragraphs": ["Allow a plugin to editorialize on the new joinrel's properties. Actions might include altering the size estimate, clearing consider_parallel, or adjusting pgs_mask.", "Allow a plugin to editorialize on the new joinrel's properties. Actions might include altering the size estimate, clearing consider_parallel, or adjusting pgs_mask. (However, note that clearing consider_parallel would be better done in the parent joinrel rather than here.)"]}, {"title": "Call sites", "paragraphs": ["src/backend/optimizer/util/relnode.c:1012", "src/backend/optimizer/util/relnode.c:1173"]}, {"code": "\t/*\n\t * Allow a plugin to editorialize on the new joinrel's properties. Actions\n\t * might include altering the size estimate, clearing consider_parallel,\n\t * or adjusting pgs_mask.\n\t */\n\tif (joinrel_setup_hook)\n\t\t(*joinrel_setup_hook) (root, joinrel, outer_rel, inner_rel, sjinfo,\n\t\t\t\t\t\t\t   restrictlist);\n\n\t/* Store the partition information. */\n\tbuild_joinrel_partition_info(root, joinrel, outer_rel, inner_rel, sjinfo,\n\t\t\t\t\t\t\t\t restrictlist);\n\n\t/* Add the joinrel to the PlannerInfo. */\n\tadd_join_rel(root, joinrel);", "title": "Core call context: src/backend/optimizer/util/relnode.c:1006\u20131020", "paragraphs": []}, {"code": "\t * Allow a plugin to editorialize on the new joinrel's properties. Actions\n\t * might include altering the size estimate, clearing consider_parallel,\n\t * or adjusting pgs_mask. (However, note that clearing consider_parallel\n\t * would be better done in the parent joinrel rather than here.)\n\t */\n\tif (joinrel_setup_hook)\n\t\t(*joinrel_setup_hook) (root, joinrel, outer_rel, inner_rel, sjinfo,\n\t\t\t\t\t\t\t   restrictlist);\n\n\t/* Is the join between partitions itself partitioned? */\n\tbuild_joinrel_partition_info(root, joinrel, outer_rel, inner_rel, sjinfo,\n\t\t\t\t\t\t\t\t restrictlist);\n\n\t/* We build the join only once. */\n\tAssert(!find_join_rel(root, joinrel->relids));", "title": "Core call context: src/backend/optimizer/util/relnode.c:1167\u20131181", "paragraphs": []}], "signature": "typedef void (*joinrel_setup_hook_type) (PlannerInfo *root, RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel, SpecialJoinInfo *sjinfo, List *restrictlist);\nextern PGDLLIMPORT joinrel_setup_hook_type joinrel_setup_hook;", "description": ["Hook for plugins to get control during joinrel setup"]}}, "content_hash": "1440c361e077d36e0d403d962fbe6c744b9af31963b265a1c6309b54892d554d", "imported_at": "2026-09-27T09:57:58.879"}, "snapshot": null, "comparison": {"left": "17", "right": "18", "status": "unchanged", "diff": ""}}