Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix explain bad indent when showing operatorMem." #289

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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