Simon Riggs wrote:
> OK, spent long time testing various batching scenarios for this using a
> custom test harness to simulate various spreads of xids in transaction
> trees. All looks fine now.
I had a look and was mostly rephrasing some comments and the README
(hopefully I didn't make any of them worse than they were), when I
noticed that the code to iterate thru pages could be refactored. I
think the change makes the algorithm in TransactionIdSetTreeStatus
easier to follow.
I also noticed that TransactionIdSetPageStatus has a "subcommit" arg
which is unexplained. I sort-of understand the point, but I think it's
better that you fill in the explanation in the header comment (marked
with XXX)
I hope I didn't break the code with the new function
set_tree_status_by_pages -- please recheck that part.
I didn't test this beyond regression tests.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support