Test coverage for external sorting - Mailing list pgsql-hackers

From Simon Riggs
Subject Test coverage for external sorting
Date
Msg-id 1113295910.16721.1351.camel@localhost.localdomain
Whole thread Raw
Responses Re: Test coverage for external sorting
List pgsql-hackers
PostgreSQL uses two different sorting algorithms, qsort and the external
sorting method in tuplesort.c. There are some possible improvements in
external sorting, so I'd like to check on the solidity of the testing
mechanisms. 

Whether external sorting can be improved upon is a different debate,
though I do have reason to believe it is possible. Initially, I am
interested in proving correctness of any change, though the eventual
goal would be performance.

I'm looking through the regression tests, but can't find anything that
explicitly tests both types of sort.

If you run the regression tests against an existing database instance it
would be possible to run the tests with various values of work_mem so as
to force the sorts to either be internal or external. 

...only problem is that the largest regression test table: tenk doesn't
occupy as much as 1 MB of space in total and work_mem cannot be set
lower than 1 MB.

Could anybody comment on whether the current tests appropriately cover
the correctness of the external sorting algorithms? Will any changes to
the external sort algorithms be appropriately tested by what is there
currently?

Best Regards, Simon Riggs





pgsql-hackers by date:

Previous
From: "Michael Paesold"
Date:
Subject: Re: System vs non-system casts
Next
From: Thomas Hallgren
Date:
Subject: OUT parameters in PL/Java