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

From Tom Lane
Subject Re: Idea about better configuration options for sort memory
Date
Msg-id 6340.1075764477@sss.pgh.pa.us
Whole thread Raw
In response to Re: Idea about better configuration options for sort  (Jeff <threshar@torgo.978.org>)
Responses Re: Idea about better configuration options for sort memory
List pgsql-hackers
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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] log session end - again
Next
From: Tom Lane
Date:
Subject: Why has postmaster shutdown gotten so slow?