Re: Idea about better configuration options for sort memory - Mailing list pgsql-hackers

From scott.marlowe
Subject Re: Idea about better configuration options for sort memory
Date
Msg-id Pine.LNX.4.33.0402021651480.20659-100000@css120.ihs.com
Whole thread Raw
In response to Re: Idea about better configuration options for sort memory  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Idea about better configuration options for sort memory  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2 Feb 2004, Tom Lane wrote:

> Jeff <threshar@torgo.978.org> writes:
> >> On Sat, 31 Jan 2004, Tom Lane wrote:
> > Well, maybe.  What's in the back of my mind is that we may come
> > across other cases besides CREATE INDEX and VACUUM that should use a
> > "one-off" setting.  I think it'd make more sense to have one
> > parameter than keep on inventing new ones.
> 
> > I don't know if this would apply here - but foriegn key creation also
> > benefits hugely from jacking up sort_mem and you also don't do too many
> > of those in parellel.   
> 
> > I'm guessing it would be quite in-elegant and kludgy to make that code
> > use the bigger pool.. it would benefit restore times though.
> 
> Actually, it wouldn't be all that hard.  We could make
> RI_Initial_Check() do the equivalent of "SET LOCAL work_mem" before
> issuing the query, and then again afterwards to restore the prior
> value.  This would have no permanent effect on work_mem, because the
> old value would be restored by transaction abort if the check query
> fails.
> 
> This seems like a good idea to me, so I'll do it unless I hear
> objections.

any chance of having some kind of max_total_sort_mem setting to keep 
machines out of swap storms, or would that be a nightmare to implement?



pgsql-hackers by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Seaching without accents
Next
From: Tom Lane
Date:
Subject: Re: Idea about better configuration options for sort memory