Re: Re: patch review : Add ability to constrain backend temporary file space

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
Cc: Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: patch review : Add ability to constrain backend temporary file space
Date: 2011-06-02 06:34:40
Message-ID: BANLkTin_J0xDP2mXjp8gWDAoFUcG8qQUNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 1, 2011 at 6:35 PM, Mark Kirkwood
<mark(dot)kirkwood(at)catalyst(dot)net(dot)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: largeobject
test: with
test: xml
test: stats
+test: resource

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dan Ports 2011-06-02 07:04:20 Re: SSI predicate locking on heap -- tuple or row?
Previous Message Pavel Stehule 2011-06-02 06:29:08 is there any reason why don't create context info for RAISE EXCEPTION?