Re: Default setting for enable_hashagg_disk
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Melanie Plageman <melanieplageman@gmail.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-06-22T20:23:58Z
Lists: pgsql-hackers, pgsql-docs
On Mon, 2020-06-22 at 15:28 -0400, Robert Haas wrote: > The weirdness is the problem here, at least for me. Generally, I > don't > like GUCs of the form give_me_the_old_strange_behavior=true I agree with all of that in general. > I don't think it necessarily implies that either. I do however have > some concerns about people using the GUC as a crutch. Another way of looking at it is that the weird behavior is already there in v12, so there are already users relying on this weird behavior as a crutch for some other planner mistake. The question is whether we want to: (a) take the weird behavior away now as a consequence of implementing disk-based HashAgg; or (b) support the weird behavior forever; or (c) introduce a GUC now to help transition away from the weird behavior The danger with (c) is that it gives users more time to become more reliant on the weird behavior; and worse, a GUC could be seen as an endorsement of the weird behavior rather than a path to eliminating it. So we could intend to do (c) and end up with (b). We can mitigate this with documentation warnings, perhaps. > I am slightly > worried that this is going to have hard-to-fix problems and that > we'll > be stuck with the GUC for that reason. Without the GUC, it's basically a normal cost-based decision, with all of the good and bad that comes with that. > Now if that is the case, is > removing the GUC any better? Maybe not. These decisions are hard, and > I am not trying to pretend like I have all the answers. I agree that there is no easy answer. My philosophy here is: if a user does experience a plan regression due to my change, would it be reasonable to tell them that we don't have any escape hatch or transition period at all? That would be a tough sell for such a common plan type. Regards, Jeff Davis
Commits
-
Add hash_mem_multiplier GUC.
- d6c08e29e7bc 14.0 landed
- 78530c8e7a5a 13.0 landed
-
HashAgg: use better cardinality estimate for recursive spilling.
- 3a232a3183d5 13.0 landed
- 9878b643f37b 14.0 landed
-
Remove hashagg_avoid_disk_plan GUC.
- bcbf9446a298 14.0 landed
- 5a6cc6ffa914 13.0 landed
-
Doc fixup for hashagg_avoid_disk_plan GUC.
- d33f33539d7f 13.0 landed
- 7ce461560159 14.0 landed
-
Rework HashAgg GUCs.
- 13e0fa7ae50c 13.0 landed
- 92c58fd94801 14.0 landed
-
Disk-based Hash Aggregation.
- 1f39bce02154 13.0 cited
-
Implement partition-wise grouping/aggregation.
- e2f1eb0ee30d 11.0 cited
-
Defer creation of partially-grouped relation until it's needed.
- 4f15e5d09de2 11.0 cited