Thanks. Attached is a rebased version of patch 2, implementing the actual feature. One thing I noticed with more testing is that if --create is used and that the destination folder does not exist, pg_receivexlog was creating the slot, and left with an error. This does not look user-friendly so I changed the logic a bit to check for the destination folder before creating any slot. This results in a bit of refactoring, but this way behavior is more intuitive.