Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-04-28 Thread vignesh C
On Thu, 25 Apr 2024 at 16:20, Amit Kapila wrote: > > On Thu, Apr 25, 2024 at 7:01 AM Zhijie Hou (Fujitsu) > wrote: > > > > On Wednesday, April 24, 2024 6:29 PM vignesh C wrote: > > > > > > > > > The attached patch > > > v7-0001-Table-sync-missed-due-to-race-condition-in-subscr.patch > > >

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-04-25 Thread vignesh C
On Wed, 24 Apr 2024 at 15:49, Amit Kapila wrote: > > On Tue, Apr 23, 2024 at 4:53 PM Amit Kapila wrote: > > > > On Wed, Mar 13, 2024 at 11:59 AM vignesh C wrote: > > > > > > On Wed, 13 Mar 2024 at 10:12, Zhijie Hou (Fujitsu) > > > wrote: > > > > > > > > > > > > For 0002, instead of avoid

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-04-25 Thread Amit Kapila
On Thu, Apr 25, 2024 at 7:01 AM Zhijie Hou (Fujitsu) wrote: > > On Wednesday, April 24, 2024 6:29 PM vignesh C wrote: > > > > > > The attached patch > > v7-0001-Table-sync-missed-due-to-race-condition-in-subscr.patch > > applies for master and PG16 branch, > >

RE: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-04-24 Thread Zhijie Hou (Fujitsu)
On Wednesday, April 24, 2024 6:29 PM vignesh C wrote: > > On Wed, 24 Apr 2024 at 11:59, Amit Kapila wrote: > > > > On Wed, Mar 13, 2024 at 9:19 AM vignesh C wrote: > > > > > > On Tue, 12 Mar 2024 at 09:34, Ajin Cherian wrote: > > > > > > > > > > > > > > > > On Tue, Mar 12, 2024 at 2:59 PM

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-04-24 Thread vignesh C
On Wed, 24 Apr 2024 at 11:59, Amit Kapila wrote: > > On Wed, Mar 13, 2024 at 9:19 AM vignesh C wrote: > > > > On Tue, 12 Mar 2024 at 09:34, Ajin Cherian wrote: > > > > > > > > > > > > On Tue, Mar 12, 2024 at 2:59 PM vignesh C wrote: > > >> > > >> > > >> Thanks, I have created the following

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-04-24 Thread Amit Kapila
On Tue, Apr 23, 2024 at 4:53 PM Amit Kapila wrote: > > On Wed, Mar 13, 2024 at 11:59 AM vignesh C wrote: > > > > On Wed, 13 Mar 2024 at 10:12, Zhijie Hou (Fujitsu) > > wrote: > > > > > > > > > For 0002, instead of avoid resetting the latch, is it possible to let the > > > logical rep worker

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-04-24 Thread Amit Kapila
On Wed, Mar 13, 2024 at 9:19 AM vignesh C wrote: > > On Tue, 12 Mar 2024 at 09:34, Ajin Cherian wrote: > > > > > > > > On Tue, Mar 12, 2024 at 2:59 PM vignesh C wrote: > >> > >> > >> Thanks, I have created the following Commitfest entry for this: > >> https://commitfest.postgresql.org/47/4816/

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-04-23 Thread Amit Kapila
On Wed, Mar 13, 2024 at 11:59 AM vignesh C wrote: > > On Wed, 13 Mar 2024 at 10:12, Zhijie Hou (Fujitsu) > wrote: > > > > > > For 0002, instead of avoid resetting the latch, is it possible to let the > > logical rep worker wake up the launcher once after attaching ? > > Waking up of the launch

RE: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-04-16 Thread Zhijie Hou (Fujitsu)
On Wednesday, March 13, 2024 11:49 AM vignesh C wrote: > > On Tue, 12 Mar 2024 at 09:34, Ajin Cherian wrote: > > > > > > > > On Tue, Mar 12, 2024 at 2:59 PM vignesh C wrote: > >> > >> > >> Thanks, I have created the following Commitfest entry for this: > >>

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-03-13 Thread vignesh C
On Wed, 13 Mar 2024 at 10:12, Zhijie Hou (Fujitsu) wrote: > > On Wednesday, March 13, 2024 11:49 AMvignesh C wrote: > > On Tue, 12 Mar 2024 at 09:34, Ajin Cherian wrote: > > > > > > > > > > > > On Tue, Mar 12, 2024 at 2:59 PM vignesh C wrote: > > >> > > >> > > >> Thanks, I have created the

RE: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-03-12 Thread Zhijie Hou (Fujitsu)
On Wednesday, March 13, 2024 11:49 AMvignesh C wrote: > On Tue, 12 Mar 2024 at 09:34, Ajin Cherian wrote: > > > > > > > > On Tue, Mar 12, 2024 at 2:59 PM vignesh C wrote: > >> > >> > >> Thanks, I have created the following Commitfest entry for this: > >>

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-03-12 Thread vignesh C
On Tue, 12 Mar 2024 at 09:34, Ajin Cherian wrote: > > > > On Tue, Mar 12, 2024 at 2:59 PM vignesh C wrote: >> >> >> Thanks, I have created the following Commitfest entry for this: >> https://commitfest.postgresql.org/47/4816/ >> >> Regards, >> Vignesh > > > Thanks for the patch, I have verified

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-03-11 Thread Ajin Cherian
On Tue, Mar 12, 2024 at 2:59 PM vignesh C wrote: > > Thanks, I have created the following Commitfest entry for this: > https://commitfest.postgresql.org/47/4816/ > > Regards, > Vignesh > Thanks for the patch, I have verified that the fix works well by following the steps mentioned to reproduce

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-02-08 Thread vignesh C
On Thu, 8 Feb 2024 at 23:30, Alexander Lakhin wrote: > > 08.02.2024 12:25, vignesh C wrote: > > Yes, the wakeup call sent by the "CREATE SUBSCRIPTION" command was > > getting missed in this case. The wakeup call can be sent during > > subscription creation/modification and when the apply worker

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-02-08 Thread Alexander Lakhin
08.02.2024 12:25, vignesh C wrote: Yes, the wakeup call sent by the "CREATE SUBSCRIPTION" command was getting missed in this case. The wakeup call can be sent during subscription creation/modification and when the apply worker exits. WaitForReplicationWorkerAttach should not reset the latch here

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-02-08 Thread vignesh C
On Tue, 6 Feb 2024 at 18:30, Alexander Lakhin wrote: > > 05.02.2024 13:13, vignesh C wrote: > > Thanks for the steps for the issue, I was able to reproduce this issue > > in my environment with the steps provided. The attached patch has a > > proposed fix where the latch will not be set in case

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-02-06 Thread Alexander Lakhin
05.02.2024 13:13, vignesh C wrote: Thanks for the steps for the issue, I was able to reproduce this issue in my environment with the steps provided. The attached patch has a proposed fix where the latch will not be set in case of the apply worker exiting immediately after starting. It looks

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-02-05 Thread vignesh C
On Fri, 2 Feb 2024 at 11:30, Alexander Lakhin wrote: > > Hello Vignesh and Hou-san, > > 01.02.2024 07:59, vignesh C wrote: > > Here is an updated patch which changes the boolean variable to a > > tri-state enum and set stable state to valid only if no invalidations > > have been occurred while

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-02-01 Thread Alexander Lakhin
Hello Vignesh and Hou-san, 01.02.2024 07:59, vignesh C wrote: Here is an updated patch which changes the boolean variable to a tri-state enum and set stable state to valid only if no invalidations have been occurred while the list is being prepared. While testing the v3 patch, I observed

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-01-31 Thread vignesh C
On Tue, 30 Jan 2024 at 17:22, Zhijie Hou (Fujitsu) wrote: > > On Tuesday, January 30, 2024 11:21 AM vignesh C wrote: > > > > On Tue, 30 Jan 2024 at 07:24, Zhijie Hou (Fujitsu) > > wrote: > > > > > > On Monday, January 29, 2024 9:22 PM vignesh C > > wrote: > > > > > > > > On Fri, 26 Jan 2024 at

RE: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-01-30 Thread Zhijie Hou (Fujitsu)
On Tuesday, January 30, 2024 11:21 AM vignesh C wrote: > > On Tue, 30 Jan 2024 at 07:24, Zhijie Hou (Fujitsu) > wrote: > > > > On Monday, January 29, 2024 9:22 PM vignesh C > wrote: > > > > > > On Fri, 26 Jan 2024 at 11:30, Alexander Lakhin > wrote: > > > > > > > > Hello hackers, > > > > > >

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-01-29 Thread vignesh C
On Tue, 30 Jan 2024 at 07:24, Zhijie Hou (Fujitsu) wrote: > > On Monday, January 29, 2024 9:22 PM vignesh C wrote: > > > > On Fri, 26 Jan 2024 at 11:30, Alexander Lakhin wrote: > > > > > > Hello hackers, > > > > > > After determining a possible cause for intermittent failures of the > > > test

RE: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-01-29 Thread Zhijie Hou (Fujitsu)
On Monday, January 29, 2024 9:22 PM vignesh C wrote: > > On Fri, 26 Jan 2024 at 11:30, Alexander Lakhin wrote: > > > > Hello hackers, > > > > After determining a possible cause for intermittent failures of the > > test subscription/031_column_list [1], I was wondering what makes > > another

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-01-29 Thread vignesh C
On Fri, 26 Jan 2024 at 11:30, Alexander Lakhin wrote: > > Hello hackers, > > After determining a possible cause for intermittent failures of the test > subscription/031_column_list [1], I was wondering what makes another > subscription test (014_binary) fail on the buildfarm: >

Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-01-25 Thread Alexander Lakhin
Hello hackers, After determining a possible cause for intermittent failures of the test subscription/031_column_list [1], I was wondering what makes another subscription test (014_binary) fail on the buildfarm: