Thread

  1. Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server

    Jeff Davis <pgsql@j-davis.com> — 2026-05-09T01:01:28Z

    On Wed, 2026-05-06 at 15:57 +0800, Chao Li wrote:
    > PFA v3 - addressed Ajin and Zsolt’s comments.
    
    Thank you for the report!
    
    The proposed patch seems unnecessarily complex, though. It seems too
    easy to add GetSubscriptionConninfo() in the wrong place and end up
    with another problem that's not easily detected.
    
    Can't we just do something like the attached? It's easy to explain at
    the call site that, when changing to a different server or using
    CONNECTION instead, that we don't need the old conninfo at all.
    
    I included your test case in my patch, and it passes.
    
    Also, Hayato Kuroda's report was an issue also because the error could
    be thrown even if slotname was NULL. Patch attached for that, as well.
    Thank you, also!
    
    Regards,
    	Jeff Davis