"Steven M. Wheeler" <swheeler@sabre.com> writes:
> I tried your suggestion for -S 32 through -S 1 running a select
> distinct against my history table. I normally run with -S 2048 on the
> startup of the master process. FYI: the history table uses the same
> layout as the currnt table, its just an hourly summation of the minute
> by minute data in currnt. history has 189,724 records.
> Bottom line: The select never failed.
My current theory is that you were running out of disk space or else
running up against a 4-gig-per-temp-file limit in the sort that's done
for SELECT DISTINCT. So -S wouldn't really affect matters, and testing
on a smaller table definitely won't prove anything one way or the other.
BTW, I believe -S 32 is the smallest value the backend will actually
accept --- it just ignores any attempt to set a smaller value.
regards, tom lane