On 6/20/15 2:57 AM, Fabien COELHO wrote:
 - as version 2: checkpoint buffer sorting based on a 2007 patch by
   Takahiro Itagaki but with a smaller and static buffer allocated once.
   Also, sorting is done by chunks of 131072 pages in the current
version,
   with a guc to change this value.

I think it's a really bad idea to do this in chunks.

The small problem I see is that for a very large setting there could be
several seconds or even minutes of sorting, which may or may not be
desirable, so having some control on that seems a good idea.

ISTM a more elegant way to handle that would be to start off with a very small number of buffers and sort larger and larger lists while the OS is busy writing/syncing.

Another argument is that Tom said he wanted that:-)

Did he elaborate why? I don't see him on this thread (though I don't have all of it).

In practice the value can be set at a high value so that it is nearly
always sorted in one go. Maybe value "0" could be made special and used
to trigger this behavior systematically, and be the default.

It'd be nice if it was just self-tuning, with no GUC.

It looks like it'd be much better to get this committed without more than we have now than to do without it though...
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to