Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Yet another PG 11 problem: postgresBeginForeignModify needs PlanState.#171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletionssrc/partition_filter.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1003,6 +1003,8 @@ prepare_rri_fdw_for_insert(ResultRelInfoHolder *rri_holder,
TupleDesctupdesc;
inti,
target_attr;
PlanState plan_state;
PlanState *plan_state_ptr;

/* Fetch RangeTblEntry for partition */
rte = rt_fetch(rri->ri_RangeTableIndex, estate->es_range_table);
Expand DownExpand Up@@ -1066,6 +1068,14 @@ prepare_rri_fdw_for_insert(ResultRelInfoHolder *rri_holder,
/* Plan fake query in for FDW access to be planned as well */
elog(DEBUG1, "FDW(%u): plan fake query for fdw_private", partid);
plan = standard_planner(&query, 0, NULL);
/*
* Add fake PlanState to mt_plans. Though no one will ever look at the
* contents, postgresBeginForeignModify segfaults since 11 if it is
* absent.
*/
memset(&plan_state, 0, sizeof(PlanState));
plan_state_ptr = &plan_state;
mtstate.mt_plans = &plan_state_ptr;

/* Extract fdw_private from useless plan */
elog(DEBUG1, "FDW(%u): extract fdw_private", partid);
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp