RE: Adding a '--two-phase' option to 'pg_createsubscriber' utility. - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Adding a '--two-phase' option to 'pg_createsubscriber' utility.
Date
Msg-id TYAPR01MB56926557E26E3B2FCF91EF77F53F2@TYAPR01MB5692.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.  (vignesh C <vignesh21@gmail.com>)
Responses Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.
Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.
List pgsql-hackers
Dear Shubham,

> Thank you for pointing this out and for suggesting the changes. I
> agree with your approach.
> Also, I found a mistake in getopt_long and fixed it in this version of
> the patch.
> The attached patch contains the suggested changes.

Thanks for updating the patch. I think the patch looks mostly OK.

Regarding the test code - I think we should directly refer the pg_subscription catalog,
and confirm that subtwophase is 'p'. IIUC, we can wait until
all subscriptions. Subtwophasestate are 'e', by using poll_query_until() and [1].

[1]: SELECT count(1) = 0 FROM pg_subscription WHERE subtwophasestate NOT IN ('e');

Best regards,
Hayato Kuroda
FUJITSU LIMITED


pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
Next
From: Richard Guo
Date:
Subject: Re: Wrong results with right-semi-joins