Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server
Date
Msg-id 8185e4371a3b2f4590ec18246cec473363b35700.camel@j-davis.com
Whole thread
In response to Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Mon, 2026-06-29 at 09:57 +0530, Amit Kapila wrote:
> wrconn = walrcv_connect(conninfo, true, true, must_use_password,
> subname, &err);

...

> So, if the connection is not successful then we simply return without
> checking tablesync slots (when slotname is NONE) whereas with FDW
> server connection, the ERROR will be raised from
> construct_subserver_conninfo->ForeignServerConnectionString(). Isn't
> that different from current situation?

It's easier to cause an error in ForeignServerConnectionString(); but
walrcv_connect() can throw errors, too. Also, a network connection is a
side-effect that you may not want to have for whatever reason.

I think it's better to have an escape that prevents any connection to
the publisher, as the documentation says, to deal with these kinds of
edge cases.

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: surya poondla
Date:
Subject: Re: Use HostsFileName everywhere
Next
From: Amit Langote
Date:
Subject: Re: JSON_VALUE/JSON_TABLE DEFAULT expression ignores RETURNING typmod