Re: work_mem, temp_buffers, and temp_file_limit - Mailing list pgsql-general

From Tom Lane
Subject Re: work_mem, temp_buffers, and temp_file_limit
Date
Msg-id 785364.1611174955@sss.pgh.pa.us
Whole thread Raw
In response to work_mem, temp_buffers, and temp_file_limit  (Michael Lewis <mlewis@entrata.com>)
List pgsql-general
Michael Lewis <mlewis@entrata.com> writes:
> I've read the documentation but am unclear on what memory is used when
> temp_buffers are exceeded by temp tables that are created.

The data gets flushed out to disk storage, or at least kernel disk buffers
(I don't think we'll try to fsync it).

> Does that also go towards temp_file_limit?

No, a "temp file" is distinct from a temporary relation.  Temp files
are used for anonymous transient stuff like a hash join's hash table.

> When are temp files (temp_file_limit) cleared out?

At the end of the query that used them.

            regards, tom lane



pgsql-general by date:

Previous
From: Michael Lewis
Date:
Subject: work_mem, temp_buffers, and temp_file_limit
Next
From: Mohamed Wael Khobalatte
Date:
Subject: Re: upgrade using logical replication