Re: Using quicksort for every external sort run

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Using quicksort for every external sort run
Date: 2015-11-30 18:25:18
Message-ID: CAMkU=1ywqjOpHDP1rOSYKT+2fYjF6vOask3cxSgC8EOwnMXc0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 29, 2015 at 8:02 PM, David Fetter <david(at)fetter(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-11-30 18:32:52 Re: Additional role attributes && superuser review
Previous Message Bruce Momjian 2015-11-30 18:16:02 Re: Freeze avoidance of very large table.