Re: Data loss on logical replication, 12.12 to 14.5, ALTER SUBSCRIPTION - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Data loss on logical replication, 12.12 to 14.5, ALTER SUBSCRIPTION
Date
Msg-id CAA4eK1LweFTFs9Q2qK6ubkkJp+os1_TeX-4Rb1=q8t1jKXvZhw@mail.gmail.com
Whole thread Raw
In response to Re: Data loss on logical replication, 12.12 to 14.5, ALTER SUBSCRIPTION  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Responses Re: Data loss on logical replication, 12.12 to 14.5, ALTER SUBSCRIPTION  (Michail Nikolaev <michail.nikolaev@gmail.com>)
List pgsql-hackers
On Mon, Dec 26, 2022 at 8:50 PM Michail Nikolaev
<michail.nikolaev@gmail.com> wrote:
>
> Hello again.
>
> Just small a fix for:
>
> > 2022-12-14 09:21:25.705 to
> > 2022-12-14 09:49:20.664 (after synchronization start, but before finish).
>
> Correct values are:
>
> 2022-12-14 09:49:31.340
> 2022-12-14 09:49:41.683
>
> So, it looks like we lost about 10s of one of the tables WAL.
>


IIUC, this is the time when only table B's initial sync was
in-progress. Table A's initial sync was finished by that time and for
Table C, it is yet not started. We have some logic where in such
overlapping phases where we allow apply worker to skip the data which
will be later applied by the initial sync worker. During the time of
the initial sync of B, are there any other operations on that table
apart from the missing ones? You may want to see the LOGs of
subscribers during the initial sync time for any errors or other
messages.


-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: "wangw.fnst@fujitsu.com"
Date:
Subject: RE: Perform streaming logical transactions by background workers and parallel apply
Next
From: Dilip Kumar
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply