Re: Default setting for enable_hashagg_disk

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Default setting for enable_hashagg_disk
Date: 2020-07-13 15:12:30
Message-ID: a9150ec8-6d16-b631-59b0-f672d67c2583@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On 2020-07-13 16:11, Tomas Vondra wrote:
> Why is running out of disk space worse experience than running out of
> memory?
>
> Sure, it'll take longer and ultimately the query fails (and if it fills
> the device used by the WAL then it may also cause shutdown of the main
> instance due to inability to write WAL). But that can be prevented by
> moving the temp tablespace and/or setting the temp file limit, as
> already mentioned.
>
> With OOM, if the kernel OOM killer decides to act, it may easily bring
> down the instance too, and there are much less options to prevent that.

Well, that's an interesting point. Depending on the OS setup, by
default an out of memory might actually be worse if the OOM killer
strikes in an unfortunate way. That didn't happen to me in my tests, so
the OS must have been configured differently by default.

So maybe a lesson here is that just like we have been teaching users to
adjust the OOM killer, we have to teach them now that setting the temp
file limit might become more important.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2020-07-13 15:45:25 Re: docs: psql and variable interpolation
Previous Message Jeff Davis 2020-07-13 14:51:03 Re: Default setting for enable_hashagg_disk

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Borisov 2020-07-13 15:32:24 Re: [PATCH] fix GIN index search sometimes losing results
Previous Message Tom Lane 2020-07-13 15:08:09 Re: GSSENC'ed connection stalls while reconnection attempts.