Hi,
LGTM. The only comment I have is that a small test wouldn't hurt... Comparedto the other things it should be fairly easy...
Greetings,
Andres Freund