Re: Changing work_mem

From: rihad <rihad(at)mail(dot)ru>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Changing work_mem
Date: 2019-08-13 15:59:20
Message-ID: 6d170b3b-17b7-8e02-bbf6-2a6885b317eb@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/13/2019 07:41 PM, Peter Eisentraut wrote:
> On 2019-08-13 17:16, rihad wrote:
>> If I increase it in postgresql.conf and SIGHUP the master server, will
>> the change be applied to all running backends, or only to the ones
>> started after the change? Thanks.
> It will be applied to all running backends.
>

Thanks, but this isn't what I'm seeing in the logs.

After I increased work_mem from 256MB to 512MB I still see lines even
with very small files created as before, including much larger ones,
hundreds of MB.

[dbname] LOG:  temporary file: path
"base/pgsql_tmp/pgsql_tmp93683.257381", size 594

It seems unlikely that the temp file is still 594 bytes bigger than
512MB after the change.

Maybe some other stuff unconditionally creates temp files regardless of
what's in work_mem?

All these "tempies" are the reason our SSD disks hosting a single
database are seeing 1TB writes in a day, according to SMART.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2019-08-13 16:22:05 Re: Changing work_mem
Previous Message Peter Eisentraut 2019-08-13 15:41:42 Re: Changing work_mem