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

From Jaime Casanova
Subject Re: Re: patch review : Add ability to constrain backend temporary file space
Date
Msg-id BANLkTin_J0xDP2mXjp8gWDAoFUcG8qQUNA@mail.gmail.com
Whole thread Raw
In response to Re: patch review : Add ability to constrain backend temporary file space  (Mark Kirkwood <mark.kirkwood@catalyst.net.nz>)
Responses Re: Re: patch review : Add ability to constrain backend temporary file space
Re: Re: patch review : Add ability to constrain backend temporary file space
List pgsql-hackers
On Wed, Jun 1, 2011 at 6:35 PM, Mark Kirkwood
<mark.kirkwood@catalyst.net.nz> wrote:
> On 01/06/11 09:24, Cédric Villemain wrote:
>>
>>  Submission review
>> ================
>>
>>     * The patch is not in context diff format.
>>     * The patch apply, but contains some extra whitespace.
>>     * Documentation is here but not explicit about 'temp tables',
>> maybe worth adding that this won't limit temporary table size ?
>>     * There is no test provided. One can be expected to check that the
>> feature work.
>>
>
> I've created a new patch (attached)

Hi Mark,

A few comments:

- why only superusers can set this? if this is a per-backend setting,
i don't see the problem in allowing normal users to restrict their own
queries

- why the calculations are done as double?
+               if (temporary_files_size / 1024.0 > (double)work_disk)



- the patch adds this to serial_schedule but no test has been added...

diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index bb654f9..325cb3d 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -127,3 +127,4 @@ test: largeobjecttest: withtest: xmltest: stats
+test: resource

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte y capacitación de PostgreSQL


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: is there any reason why don't create context info for RAISE EXCEPTION?
Next
From: Dan Ports
Date:
Subject: Re: SSI predicate locking on heap -- tuple or row?