Re: Missing rows after migrating from postgres 11 to 12 with logical replication

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Lars Vonk <lars(dot)vonk(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Missing rows after migrating from postgres 11 to 12 with logical replication
Date: 2020-12-21 21:22:56
Message-ID: 9f505de4-440d-f4c8-4f8a-70e7abd0ed00@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/21/20 12:26 PM, Lars Vonk wrote:
> Hi Adrian,
>
> Thanks for taking the time to reply!

>
> 2) Are the logs still available for inspection to see if there where
> any
> errors thrown?
>
>
> Yes, and we dug into those. And we also found some indications that
> something went wrong.
>

> 4) How did you determine the rows where missing?
>
>
> We were alerted by a bug later that day and found that some rows were
> missing in the new primary. We did a compare based on primary key and
> found that several tables were missing rows. Before the switch we
> unfortunately only checked max(id) and did some counts on tables and
> those all checked out. We didn't do a count on all tables...
>
> So to come back at the logs:
>
> We dug a little deeper and we did found ERROR logs around the time we
> ran the initial copies. During a period of several hours that day we see
> a couple of messages like:
>
> ERROR: requested WAL segment 00000001000001F10000001D has already
> been removed

What was being run when the above ERROR was triggered?

>
> Regards,
> Lars
>
> On Sun, Dec 20, 2020 at 6:58 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lars Vonk 2020-12-21 22:42:22 Re: Missing rows after migrating from postgres 11 to 12 with logical replication
Previous Message Lu, Dan 2020-12-21 21:03:14 pg_upgrade question