Thread: [HACKERS] logical rep worker for table sync can start and stop very frequently unexpectedly
[HACKERS] logical rep worker for table sync can start and stop very frequently unexpectedly
From
Fujii Masao
Date:
Hi, I observed $subject when I ran the following steps. 1. start the publisher server 2. start the subscriber server 3. create table with primary key and publication for it 4. insert several records into the table 5. create table with primary key and subscription 6. wait for table sync to finish 7. drop the subscription and recreate the subscription Then the launcher starts the worker, and the worker starts another worker for table sync. But that worker for table sync exits immediately because of primary key violation. Then the worker tries to start new worker for table sync immediately and it also exits immediately because of primary key violation. This sequence repeats very fast... Attached is the script that I used to reproduce the issue. Regards, -- Fujii Masao -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Attachment
Re: [HACKERS] logical rep worker for table sync can start and stopvery frequently unexpectedly
From
Masahiko Sawada
Date:
On Wed, Apr 12, 2017 at 2:05 AM, Fujii Masao <masao.fujii@gmail.com> wrote: > Hi, > > I observed $subject when I ran the following steps. > > 1. start the publisher server > 2. start the subscriber server > 3. create table with primary key and publication for it > 4. insert several records into the table > 5. create table with primary key and subscription > 6. wait for table sync to finish > 7. drop the subscription and recreate the subscription > > Then the launcher starts the worker, and the worker starts > another worker for table sync. But that worker for table sync > exits immediately because of primary key violation. > Then the worker tries to start new worker for table sync immediately > and it also exits immediately because of primary key violation. > This sequence repeats very fast... > > Attached is the script that I used to reproduce the issue. > I encountered the same situation[1] and am proposing to put interval of launching table sync worker after failed to attempt. [1] https://www.postgresql.org/message-id/CAD21AoDCnyRJDUY%3DESVVe68AukvOP2dFomTeBFpAd1TiFbjsGg%40mail.gmail.com Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
Re: [HACKERS] logical rep worker for table sync can start and stopvery frequently unexpectedly
From
Fujii Masao
Date:
On Wed, Apr 12, 2017 at 2:40 AM, Masahiko Sawada <sawada.mshk@gmail.com> wrote: > On Wed, Apr 12, 2017 at 2:05 AM, Fujii Masao <masao.fujii@gmail.com> wrote: >> Hi, >> >> I observed $subject when I ran the following steps. >> >> 1. start the publisher server >> 2. start the subscriber server >> 3. create table with primary key and publication for it >> 4. insert several records into the table >> 5. create table with primary key and subscription >> 6. wait for table sync to finish >> 7. drop the subscription and recreate the subscription >> >> Then the launcher starts the worker, and the worker starts >> another worker for table sync. But that worker for table sync >> exits immediately because of primary key violation. >> Then the worker tries to start new worker for table sync immediately >> and it also exits immediately because of primary key violation. >> This sequence repeats very fast... >> >> Attached is the script that I used to reproduce the issue. >> > > I encountered the same situation[1] and am proposing to put interval > of launching table sync worker after failed to attempt. > > [1] https://www.postgresql.org/message-id/CAD21AoDCnyRJDUY%3DESVVe68AukvOP2dFomTeBFpAd1TiFbjsGg%40mail.gmail.com Okay, let's discuss this in that thread. Thanks! Regards, -- Fujii Masao