Re: WIP - Add ability to constrain backend temporary file space - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: WIP - Add ability to constrain backend temporary file space
Date
Msg-id 4D5ECB67.2020702@agliodbs.com
Whole thread Raw
In response to WIP - Add ability to constrain backend temporary file space  (Mark Kirkwood <mark.kirkwood@catalyst.net.nz>)
Responses Re: WIP - Add ability to constrain backend temporary file space
List pgsql-hackers
Mark,

> I got to wonder how hard this would be to do in Postgres, and attached
> is my (WIP) attempt. It provides a guc (max_temp_files_size) to limit
> the size of all temp files for a backend and amends fd.c cancel
> execution if the total size of temporary files exceeds this.

First, are we just talking about pgsql_tmp here, or the pg_temp
tablespace?  That is, just sort/hash files, or temporary tables as well?

Second, the main issue with these sorts of macro-counters has generally
been their locking effect on concurrent activity.  Have you been able to
run any tests which try to run lots of small externally-sorted queries
at once on a multi-core machine, and checked the effect on throughput?

--                                  -- Josh Berkus                                    PostgreSQL Experts Inc.
                        http://www.pgexperts.com
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: using a lot of maintenance_work_mem
Next
From: Robert Haas
Date:
Subject: Re: SR standby hangs