Thread

  1. Re: Resetting recovery target parameters in pg_createsubscriber

    Alena Vinter <dlaaren8@gmail.com> — 2025-09-23T05:04:04Z

    Hi,
    
    I'm back with improvements :)
    I've added code comments in `recovery_gen.c` and expanded the documentation
    in `pg_createsubscriber.sgml`.
    
    About the recovery parameters cleanup: I thought about adding an exit
    callback, but it doesn't really make sense because once the target server
    gets promoted (which happens soon after we set the parameters), there's no
    point in cleaning up - the server is already promoted and can't be used as
    a replica again and must be recreated. Also, `reset_recovery_params()`
    might call `exit()` itself, which could cause problems with the cleanup
    callback.
    So I think it's better to just warn users about leftover parameters and let
    them handle the cleanup manually if needed.
    
    By the way, is it ok that the second patch includes both code and test
    changes together, or should I split them into separate commits?
    
    I look forward to your feedback!
    
    Regards,
    Alena Vinter