From: | Keith Fiske <keith(at)omniti(dot)com> |
---|---|
To: | "Artem Tomyuk *EXTERN*" <admin(at)leboutique(dot)com> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: temporary file |
Date: | 2015-10-09 14:38:05 |
Message-ID: | CAG1_KcDbtfOZEg5nAJrdWXm_UxkM6BFHQC55hbioPYMZc_ne6w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Fri, Oct 9, 2015 at 8:53 AM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
wrote:
> Artem Tomyuk wrote:
> > The questions is how to avoid creating temp files on disk?
> >
> > The work_mem parameter set to 1600 Megabytes, but on logs i still can
> see the messages like:
> > LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp7905.2", size
> 865869824
>
> Temporary files on disk are smaller than the memory required for the
> corresponding in-memory
> operation, which explains why the size of the temporary file is less than
> 1600 MB.
>
> You can either try to increase work_mem or change the query so that it
> does not perform
> such large operations.
>
> Yours,
> Laurenz Albe
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
Probably better off trying to optimize your query vs large work_mem values
like that.
Recommend reading over
https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server to learn
what work_mem actually does (and a bunch of other great tuning info). You
could run yourself out of memory really fast if that's your default
work_mem setting.
--
Keith Fiske
Database Administrator
OmniTI Computer Consulting, Inc.
http://www.keithf4.com
From | Date | Subject | |
---|---|---|---|
Next Message | dinesh bhandary | 2015-10-09 16:48:39 | streaming rep setup in PCI compliance environment |
Previous Message | Albe Laurenz | 2015-10-09 12:53:46 | Re: temporary file |