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

Commitc907d6e

Browse files
committed
all tests pass
1 parentc0e3513 commitc907d6e

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

‎expected/pathman_update_node.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ EXPLAIN (COSTS OFF) UPDATE test_update_node.test_range SET val = 5 WHERE val = 1
1818
QUERY PLAN
1919
-------------------------------------------------------------------
2020
Update on test_range_2
21-
-> Custom Scan (PartitionRouter)
22-
-> Custom Scan (PartitionFilter)
21+
-> Custom Scan (PartitionFilter)
22+
-> Custom Scan (PartitionRouter)
2323
-> Bitmap Heap Scan on test_range_2
2424
Recheck Cond: (val = '15'::numeric)
2525
-> Bitmap Index Scan on test_range_2_val_idx
@@ -31,8 +31,8 @@ EXPLAIN (COSTS OFF) UPDATE test_update_node.test_range SET val = 14 WHERE val =
3131
QUERY PLAN
3232
-------------------------------------------------------------------
3333
Update on test_range_2
34-
-> Custom Scan (PartitionRouter)
35-
-> Custom Scan (PartitionFilter)
34+
-> Custom Scan (PartitionFilter)
35+
-> Custom Scan (PartitionRouter)
3636
-> Bitmap Heap Scan on test_range_2
3737
Recheck Cond: (val = '15'::numeric)
3838
-> Bitmap Index Scan on test_range_2_val_idx

‎src/partition_router.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ boolpg_pathman_enable_partition_router = true;
2828
CustomScanMethodspartition_router_plan_methods;
2929
CustomExecMethodspartition_router_exec_methods;
3030

31-
staticTupleTableSlot*ExecDeleteInternal(TupleTableSlot*slot,
31+
staticTupleTableSlot*router_delete_tuple(TupleTableSlot*slot,
3232
ItemPointertupleid,
3333
EPQState*epqstate,
3434
EState*estate);
@@ -187,23 +187,16 @@ partition_router_exec(CustomScanState *node)
187187
else
188188
elog(ERROR,UPDATE_NODE_NAME" cannot handle relkind %u",relkind);
189189

190-
elog(INFO,"deleting (%d, %d) from table: %s",
191-
ItemPointerGetBlockNumber(&ctid),
192-
ItemPointerGetOffsetNumber(&ctid),
193-
get_rel_name(RelationGetRelid(current_rri->ri_RelationDesc)));
194-
195190
/* Magic: replace parent's ResultRelInfo with ours */
196191
estate->es_result_relation_info=current_rri;
197192

198193
/* Delete tuple from old partition */
199194
Assert(ItemPointerIsValid(&ctid));
200-
slot=ExecDeleteInternal(slot,&ctid,&state->epqstate,estate);
195+
slot=router_delete_tuple(slot,&ctid,&state->epqstate,estate);
201196

197+
/* We require a tuple */
202198
if (TupIsNull(slot))
203-
{
204-
elog(INFO,"oops, deleted, taking next tuple!");
205199
gototake_next_tuple;
206-
}
207200

208201
/* Tuple will be inserted by ModifyTable */
209202
returnExecFilterJunk(state->junkfilter,slot);
@@ -244,7 +237,7 @@ partition_router_explain(CustomScanState *node, List *ancestors, ExplainState *e
244237
*/
245238

246239
staticTupleTableSlot*
247-
ExecDeleteInternal(TupleTableSlot*slot,
240+
router_delete_tuple(TupleTableSlot*slot,
248241
ItemPointertupleid,
249242
EPQState*epqstate,
250243
EState*estate)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp