pgsql: Since sort_bounded_heap makes state changes that should be made

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Since sort_bounded_heap makes state changes that should be made
Date: 2007-09-01 18:47:39
Message-ID: 20070901184739.210CB754201@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Since sort_bounded_heap makes state changes that should be made
regardless of the number of tuples involved, it's incorrect to skip it
when memtupcount = 1; the number of cycles saved is minuscule anyway.
An alternative solution would be to pull the state changes out to the
call site in tuplesort_performsort, but keeping them near the corresponding
changes in make_bounded_heap seems marginally cleaner. Noticed by
Greg Stark.

Modified Files:
--------------
pgsql/src/backend/utils/sort:
tuplesort.c (r1.77 -> r1.78)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/sort/tuplesort.c?r1=1.77&r2=1.78)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2007-09-01 22:08:41 pgsql: Properly indent SGML source of libpq.sgml.
Previous Message ohp 2007-09-01 18:15:03 Re: Re: [COMMITTERS] pgsql: Fix brain fade in DefineIndex(): it was continuing to access the