This one really works and includes a basic test case. You were right
that the extra Register was bogus :-( I had to expose CopySnapshot,
which I still don't like but ... (I could have added an extra
Unregister somewhere during portal close, but it would have meant making
everything messier).
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support