Re: Improve the connection failure error messages

2024-05-31 Thread Nisha Moond
On Fri, Apr 26, 2024 at 1:10 PM Daniel Gustafsson wrote: > > > On 22 Mar 2024, at 11:42, Nisha Moond wrote: > > > Here is the v4 patch with changes required in slotfuncs.c and slotsync.c > > files. > > - errmsg("could not connect to the primary server: %s", err)); > + errmsg("\"%s\"

Re: Improve the connection failure error messages

2024-04-26 Thread Daniel Gustafsson
> On 22 Mar 2024, at 11:42, Nisha Moond wrote: > Here is the v4 patch with changes required in slotfuncs.c and slotsync.c > files. - errmsg("could not connect to the primary server: %s", err)); + errmsg("\"%s\" could not connect to the primary server: %s", app_name.data, err));

Re: Improve the connection failure error messages

2024-04-25 Thread Peter Smith
Hi, just by visual inspection of the v3/v4 patch diffs, the latest v4 LGTM. == Kind Regards, Peter Smith. Fujitsu Australia

Re: Improve the connection failure error messages

2024-03-22 Thread Nisha Moond
On Wed, Mar 13, 2024 at 11:16 AM Peter Smith wrote: > > FYI -- some more code has been pushed since this patch was last > updated. AFAICT perhaps you'll want to update this patch again for the > following new connection messages on HEAD: > > - slotfuncs.c [1] > - slotsync.c [2] > > -- >

Re: Improve the connection failure error messages

2024-03-12 Thread Peter Smith
FYI -- some more code has been pushed since this patch was last updated. AFAICT perhaps you'll want to update this patch again for the following new connection messages on HEAD: - slotfuncs.c [1] - slotsync.c [2] -- [1]

Re: Improve the connection failure error messages

2024-01-31 Thread Peter Smith
On Wed, Jan 31, 2024 at 9:58 PM Nisha Moond wrote: > > >> AFAIK some recent commits patches (e,g [1] for the "slot sync" >> development) have created some more cases of "could not connect..." >> messages. So, you might need to enhance your patch to deal with any >> new ones in the latest HEAD.

Re: Improve the connection failure error messages

2024-01-31 Thread Nisha Moond
> AFAIK some recent commits patches (e,g [1] for the "slot sync" > development) have created some more cases of "could not connect..." > messages. So, you might need to enhance your patch to deal with any > new ones in the latest HEAD. > > == > [1] >

Re: Improve the connection failure error messages

2024-01-30 Thread Peter Smith
AFAIK some recent commits patches (e,g [1] for the "slot sync" development) have created some more cases of "could not connect..." messages. So, you might need to enhance your patch to deal with any new ones in the latest HEAD. == [1]

Re: Improve the connection failure error messages

2024-01-18 Thread Nisha Moond
On Fri, Jan 12, 2024 at 7:06 PM Aleksander Alekseev wrote: > > Hi, > > Thanks for the patch. > > > Due to this behavior, it is not possible to add a test to show the > > error message as it is done for CREATE SUBSCRIPTION. > > Let me know if you think there is another way to add this test. > > I

Re: Improve the connection failure error messages

2024-01-17 Thread Peter Smith
On Wed, Jan 17, 2024 at 7:15 PM Nisha Moond wrote: > > > > > ~~ > > > > BTW, while experimenting with the bad connection ALTER I also tried > > setting 'disable_on_error' like below: > > > > ALTER SUBSCRIPTION sub4 SET (disable_on_error); > > ALTER SUBSCRIPTION sub4 CONNECTION 'port = -1'; > > >

Re: Improve the connection failure error messages

2024-01-17 Thread Nisha Moond
> > ~~ > > BTW, while experimenting with the bad connection ALTER I also tried > setting 'disable_on_error' like below: > > ALTER SUBSCRIPTION sub4 SET (disable_on_error); > ALTER SUBSCRIPTION sub4 CONNECTION 'port = -1'; > > ...but here the subscription did not become DISABLED as I expected it >

Re: Improve the connection failure error messages

2024-01-16 Thread Nisha Moond
Thanks for reviewing, please find my response inline. On Wed, Jan 17, 2024 at 4:56 AM Peter Smith wrote: > > On Sat, Jan 13, 2024 at 12:36 AM Aleksander Alekseev > wrote: > > > > Hi, > > > > Thanks for the patch. > > > > > Due to this behavior, it is not possible to add a test to show the > > >

Re: Improve the connection failure error messages

2024-01-16 Thread Peter Smith
On Sat, Jan 13, 2024 at 12:36 AM Aleksander Alekseev wrote: > > Hi, > > Thanks for the patch. > > > Due to this behavior, it is not possible to add a test to show the > > error message as it is done for CREATE SUBSCRIPTION. > > Let me know if you think there is another way to add this test. > > I

Re: Improve the connection failure error messages

2024-01-12 Thread Aleksander Alekseev
Hi, Thanks for the patch. > Due to this behavior, it is not possible to add a test to show the > error message as it is done for CREATE SUBSCRIPTION. > Let me know if you think there is another way to add this test. I believe it can be done with TAP tests, see for instance:

Re: Improve the connection failure error messages

2024-01-12 Thread Nisha Moond
Thanks for the review. Attached v2 patch with suggested changes. Please find my response inline. On Fri, Jan 12, 2024 at 8:20 AM Peter Smith wrote: > > Thanks for the patch! Here are a couple of review comments for it. > > == > src/backend/commands/subscriptioncmds.c > > 1. > @@ -742,7

Re: Improve the connection failure error messages

2024-01-11 Thread Peter Smith
Thanks for the patch! Here are a couple of review comments for it. == src/backend/commands/subscriptioncmds.c 1. @@ -742,7 +742,7 @@ CreateSubscription(ParseState *pstate, CreateSubscriptionStmt *stmt, if (!wrconn) ereport(ERROR, (errcode(ERRCODE_CONNECTION_FAILURE), - errmsg("could

Improve the connection failure error messages

2024-01-11 Thread Nisha Moond
Hi Hackers, Various sections of the code utilize the walrcv_connect() function, employed by various processes such as walreceiver, logical replication apply worker, etc., to establish connections with other hosts. Presently, in case of connection failures, the error message lacks information