Lists: | pgsql-committerspgsql-hackers |
---|
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Add temp_file_limit GUC parameter to constrain temporary file sp |
Date: | 2011-07-17 18:19:51 |
Message-ID: | E1QiVwV-0001aa-41@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Add temp_file_limit GUC parameter to constrain temporary file space usage.
The limit is enforced against the total amount of temp file space used by
each session.
Mark Kirkwood, reviewed by Cédric Villemain and Tatsuo Ishii
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/23e5b16c71f2706978c5f54aabd28ed23a54b6a5
Modified Files
--------------
doc/src/sgml/config.sgml | 33 +++++++++++-
src/backend/storage/file/fd.c | 69 ++++++++++++++++++++++---
src/backend/utils/errcodes.txt | 11 ++--
src/backend/utils/misc/guc.c | 15 +++++
src/backend/utils/misc/postgresql.conf.sample | 5 ++
src/include/utils/guc.h | 2 +
src/include/utils/guc_tables.h | 1 +
7 files changed, 122 insertions(+), 14 deletions(-)
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Add temp_file_limit GUC parameter to constrain temporary file sp |
Date: | 2011-07-17 21:08:56 |
Message-ID: | 201107172108.p6HL8vo01029@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Tom Lane wrote:
> Add temp_file_limit GUC parameter to constrain temporary file space usage.
>
> The limit is enforced against the total amount of temp file space used by
> each session.
>
> Mark Kirkwood, reviewed by C?dric Villemain and Tatsuo Ishii
Should we document that sessions that exceed this limit generate an
error? I don't see any mention of this in the docs.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Add temp_file_limit GUC parameter to constrain temporary file sp |
Date: | 2011-07-17 21:10:02 |
Message-ID: | 4858.1310937002@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Tom Lane wrote:
>> Add temp_file_limit GUC parameter to constrain temporary file space usage.
>>
>> The limit is enforced against the total amount of temp file space used by
>> each session.
>>
>> Mark Kirkwood, reviewed by C?dric Villemain and Tatsuo Ishii
> Should we document that sessions that exceed this limit generate an
> error? I don't see any mention of this in the docs.
Huh? Seems like a waste of text to me. What else would happen?
regards, tom lane
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Add temp_file_limit GUC parameter to constrain temporary file sp |
Date: | 2011-07-17 22:39:19 |
Message-ID: | 201107172239.p6HMdJX12317@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Tom Lane wrote:
> >> Add temp_file_limit GUC parameter to constrain temporary file space usage.
> >>
> >> The limit is enforced against the total amount of temp file space used by
> >> each session.
> >>
> >> Mark Kirkwood, reviewed by C?dric Villemain and Tatsuo Ishii
>
> > Should we document that sessions that exceed this limit generate an
> > error? I don't see any mention of this in the docs.
>
> Huh? Seems like a waste of text to me. What else would happen?
Well, if we exceed work_mem, we spill to temp disk. If we exceed temp
disk, we error out. Those different behaviors don't seem obvious to me.
The work_mem docs do mention is spills to disk though, so maybe it is
OK.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: Re: [COMMITTERS] pgsql: Add temp_file_limit GUC parameter to constrain temporary file sp |
Date: | 2011-07-18 10:52:50 |
Message-ID: | 1310986371.619.0.camel@fsopti579.F-Secure.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On sön, 2011-07-17 at 18:39 -0400, Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > > Tom Lane wrote:
> > >> Add temp_file_limit GUC parameter to constrain temporary file space usage.
> > >>
> > >> The limit is enforced against the total amount of temp file space used by
> > >> each session.
> > >>
> > >> Mark Kirkwood, reviewed by C?dric Villemain and Tatsuo Ishii
> >
> > > Should we document that sessions that exceed this limit generate an
> > > error? I don't see any mention of this in the docs.
> >
> > Huh? Seems like a waste of text to me. What else would happen?
>
> Well, if we exceed work_mem, we spill to temp disk. If we exceed temp
> disk, we error out. Those different behaviors don't seem obvious to me.
> The work_mem docs do mention is spills to disk though, so maybe it is
> OK.
Sounds like it would be good to document the behavior if the limit is
exceeded in each case.
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [COMMITTERS] pgsql: Add temp_file_limit GUC parameter to constrain temporary file sp |
Date: | 2011-07-18 14:36:07 |
Message-ID: | 2728.1310999767@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Tom Lane wrote:
>> Huh? Seems like a waste of text to me. What else would happen?
> Well, if we exceed work_mem, we spill to temp disk. If we exceed temp
> disk, we error out. Those different behaviors don't seem obvious to me.
[ shrug... ] Feel free to change it.
regards, tom lane
From: | Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [COMMITTERS] pgsql: Add temp_file_limit GUC parameter to constrain temporary file sp |
Date: | 2011-07-18 22:29:45 |
Message-ID: | 4E24B3D9.7080702@catalyst.net.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On 19/07/11 02:36, Tom Lane wrote:
> Bruce Momjian<bruce(at)momjian(dot)us> writes:
>> Tom Lane wrote:
>>> Huh? Seems like a waste of text to me. What else would happen?
>> Well, if we exceed work_mem, we spill to temp disk. If we exceed temp
>> disk, we error out. Those different behaviors don't seem obvious to me.
> [ shrug... ] Feel free to change it.
>
>
No objections from me - can't see any harm in making it very clear what
happens when the limit is exceeded :-)
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [COMMITTERS] pgsql: Add temp_file_limit GUC parameter to constrain temporary file sp |
Date: | 2012-08-03 19:15:56 |
Message-ID: | 20120803191556.GG3463@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Tue, Jul 19, 2011 at 10:29:45AM +1200, Mark Kirkwood wrote:
> On 19/07/11 02:36, Tom Lane wrote:
> >Bruce Momjian<bruce(at)momjian(dot)us> writes:
> >>Tom Lane wrote:
> >>>Huh? Seems like a waste of text to me. What else would happen?
> >>Well, if we exceed work_mem, we spill to temp disk. If we exceed temp
> >>disk, we error out. Those different behaviors don't seem obvious to me.
> >[ shrug... ] Feel free to change it.
> >
> >
>
> No objections from me - can't see any harm in making it very clear
> what happens when the limit is exceeded :-)
Documentation patch attached and applied, and backpatched to 9.2.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachment | Content-Type | Size |
---|---|---|
temp_file_limit.diff | text/x-diff | 1.0 KB |