Skip to content

Commit

Permalink
Revert "Fix explain bad indent when showing operatorMem. (#288)"
Browse files Browse the repository at this point in the history
This reverts commit 5a33f73.
  • Loading branch information
avamingli authored Nov 7, 2023
1 parent 3d3cd68 commit 8000358
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
4 changes: 3 additions & 1 deletion src/backend/commands/explain.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
}

if (ResManagerPrintOperatorMemoryLimits())
appendStringInfo(es->str, " (operatorMem: "UINT64_FORMAT"kB)", PlanStateOperatorMemKB(planstate));
{
ExplainPropertyInteger("operatorMem", "kB", PlanStateOperatorMemKB(planstate), es);
}
/*
* We have to forcibly clean up the instrumentation state because we
* haven't done ExecutorEnd yet. This is pretty grotty ...
Expand Down
16 changes: 0 additions & 16 deletions src/test/regress/expected/workfile/hashjoin_spill.out
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,6 @@ insert into test_hj_spill SELECT i,i,i%1000,i,i,i,i,i from
(select count(*) as nsegments from gp_segment_configuration where role='p' and content >= 0) foo) bar;
SET statement_mem=1024;
set gp_resqueue_print_operator_memory_limits=on;
explain(costs off) select count(i3), avg(i3::numeric) from (SELECT t1.* FROM test_hj_spill AS t1 RIGHT JOIN test_hj_spill AS t2 ON t1.i1=t2.i2) foo;
QUERY PLAN
----------------------------------------------------------------------------------------------
Finalize Aggregate (operatorMem: 100kB)
-> Gather Motion 3:1 (slice1; segments: 3) (operatorMem: 100kB)
-> Partial Aggregate (operatorMem: 100kB)
-> Hash Left Join (operatorMem: 100kB)
Hash Cond: (t2.i2 = t1.i1)
-> Redistribute Motion 3:3 (slice2; segments: 3) (operatorMem: 100kB)
Hash Key: t2.i2
-> Seq Scan on test_hj_spill t2 (operatorMem: 100kB)
-> Hash (operatorMem: 624kB)
-> Seq Scan on test_hj_spill t1 (operatorMem: 100kB)
Optimizer: Postgres query optimizer
(11 rows)

set gp_workfile_compression = on;
select count(i3), avg(i3::numeric) from (SELECT t1.* FROM test_hj_spill AS t1 RIGHT JOIN test_hj_spill AS t2 ON t1.i1=t2.i2) foo;
count | avg
Expand Down
1 change: 0 additions & 1 deletion src/test/regress/sql/workfile/hashjoin_spill.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ insert into test_hj_spill SELECT i,i,i%1000,i,i,i,i,i from
(select count(*) as nsegments from gp_segment_configuration where role='p' and content >= 0) foo) bar;
SET statement_mem=1024;
set gp_resqueue_print_operator_memory_limits=on;
explain(costs off) select count(i3), avg(i3::numeric) from (SELECT t1.* FROM test_hj_spill AS t1 RIGHT JOIN test_hj_spill AS t2 ON t1.i1=t2.i2) foo;

set gp_workfile_compression = on;
select count(i3), avg(i3::numeric) from (SELECT t1.* FROM test_hj_spill AS t1 RIGHT JOIN test_hj_spill AS t2 ON t1.i1=t2.i2) foo;
Expand Down

0 comments on commit 8000358

Please sign in to comment.