On Tue, Jun 24, 2008 at 3:08 PM, Tom Lane <
tgl@sss.pgh.pa.us> wrote:
>> Now, *why* it is a mistake is interesting to speculate about, but
>> let's confirm the theory first.
> Could this be related to hint bit rewrites during indexing?
If so, changing maintenance_work_mem won't improve the situation.
What I personally suspect is that Jeff's index build is swapping like
crazy, or else there's just some problem in the sort code for such a
large sort arena. But let's get some evidence about how the index build
time varies with maintenance_work_mem before jumping to conclusions.
Well it definitely isn't that, because the machine doesn't even have a swap area defined. vmstat during the table creation and index creation look really quite different. During the table sort there's a heavy r/w traffic 12-20MB/s, during the index creation it's lower. But seem to be CPU limited (i.e. one CPU is maxed out the whole time, and iowait is not very high).
I guess nobody has any interest in my proposal, only in the departure of my described experience from expected behavior :-(