On Wed, Jul 29, 2020 at 08:43:24PM -0700, David G. Johnston wrote:
> On Wednesday, July 29, 2020, Peter Geoghegan <p...@bowt.ie> wrote:
> 
>     On Wed, Jul 29, 2020 at 6:30 PM Bruce Momjian <br...@momjian.us> wrote:
>     > > There should be a note about this in the Postgres 13 release notes,
>     > > for the usual reasons. More importantly, the "Allow hash aggregation
>     > > to use disk storage for large aggregation result sets" feature should
>     > > reference the new GUC directly. Users should be advised that the GUC
>     > > may be useful in cases where they upgrade and experience a performance
>     > > regression linked to slower hash aggregation. Just including a
>     > > documentation link for the GUC would be very helpful.
>     >
>     > I came up with the attached patch.
> 
>     I was thinking something along like the following (after the existing
>     sentence about avoiding hash aggs in the planner):
> 
>     If you find that hash aggregation is slower than in previous major
>     releases of PostgreSQL, it may be useful to increase the value of
>     hash_mem_multiplier. This allows hash aggregation to use more memory
>     without affecting competing query operations that are generally less
>     likely to put any additional memory to good use.

I came up with a more verbose documentation suggestion, attached.

> How about adding wording for GROUP BY as well to cater to users who are more
> comfortable thinking in terms of SQL statements instead of execution plans?

Uh, it is unclear exactly what SQL generates what node types, so I want
to avoid this.

-- 
  Bruce Momjian  <br...@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee

diff --git a/doc/src/sgml/release-13.sgml b/doc/src/sgml/release-13.sgml
new file mode 100644
index 18e6497..0b1051b
*** a/doc/src/sgml/release-13.sgml
--- b/doc/src/sgml/release-13.sgml
*************** Author: Jeff Davis <jda...@postgresql.or
*** 649,655 ****
  
         <para>
          Previously, hash aggregation was avoided if it was expected to use
!         more than <xref linkend="guc-work-mem"/> memory.
         </para>
        </listitem>
  
--- 649,658 ----
  
         <para>
          Previously, hash aggregation was avoided if it was expected to use
!         more than <xref linkend="guc-work-mem"/> memory.  To reduce the
!         likelihood of using disk storage for hash aggregation and attain
!         behavior similar to previous Postgres releases, increase <xref
!         linkend="guc-hash-mem-multiplier"/>.
         </para>
        </listitem>
  

Reply via email to