Missing rows after logical replication in new primary

Поиск
Список
Период
Сортировка
От Lars Vonk
Тема Missing rows after logical replication in new primary
Дата
Msg-id CAMX1ThjXG-k7jVWy8QhC360gFn_xO+Nr6PPgDYQb5yeAMbZJFg@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hi,

We migrated from postgres 11 to 12 using logical replication. Today we noticed that one table is missing 1252 rows after the replication finished and we flipped to the new primary (we still have the old so we can recover).

We see that these rows were inserted in the table after starting the initial copy of the table. Most of the missing rows seem from new inserts happening **during the initial copy** (1230) and the rest (22) from inserts **during the period the replication ran** (7 days).

This table is a (for us) high volume table (> 400.000.000 rows), with daily > 150.000  new inserts.

We took a per-table approach for the replication and this table was the last table we started in our replication.

We did some sanity checks before we switched to the new master, like comparing max(id) to see if the replica was up to date (including this table) and counts on some tables and that all checked out okay.

So how can this happen? For now it seems that only this table suffered from it, but we are pretty 'scared' more tables are affected, so we will have to check them all.

Lars

В списке pgsql-general по дате отправления:

Предыдущее
От: Gustavsson Mikael
Дата:
Сообщение: SV: SV: SV: Problem with ssl and psql in Postgresql 13
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Unexpected result count from update statement on partitioned table