Re: Using quicksort for every external sort run - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: Using quicksort for every external sort run
Date
Msg-id CAMkU=1ywqjOpHDP1rOSYKT+2fYjF6vOask3cxSgC8EOwnMXc0Q@mail.gmail.com
Whole thread Raw
In response to Re: Using quicksort for every external sort run  (David Fetter <david@fetter.org>)
List pgsql-hackers
On Sun, Nov 29, 2015 at 8:02 PM, David Fetter <david@fetter.org> wrote:
>>
>> For me very large sorts (100,000,000 ints) with work_mem below 4MB do
>> better with unpatched than with your patch series, by about 5%.  Not a
>> big deal, but also if it is easy to keep the old behavior then I think
>> we should.  Yes, it is dumb to do large sorts with work_mem below 4MB,
>> but if you have canned apps which do a mixture of workloads it is not
>> so easy to micromanage their work_mem.  Especially as there are no
>> easy tools that let me as the DBA say "if you connect from this IP
>> address, you get this work_mem".
>
> That's certainly doable with pgbouncer, for example.

I had not considered that.  How would you do it with pgbouncer?  The
think I can think of would be to put it in server_reset_query, which
doesn't seem correct.


>  What would you
> have in mind for the more general capability?  It seems to me that
> bloating up pg_hba.conf would be undesirable, but maybe I'm picturing
> this as bigger than it actually needs to be.

I would envision something like "ALTER ROLE set ..." only for
application_name and IP address instead of ROLE.  I have no idea how I
would implement that, it is just how I would like to use it as the end
user.

Cheers,

Jeff



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Freeze avoidance of very large table.
Next
From: Stephen Frost
Date:
Subject: Re: Additional role attributes && superuser review