pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Lars Vonk <lars.vonk@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Missing rows after migrating from postgres 11 to 12 with logical replication
Date: Mon, 21 Dec 2020 13:22:56 -0800
Message-ID: <9f505de4-440d-f4c8-4f8a-70e7abd0ed00@aklaver.com> (raw)
In-Reply-To: <CAMX1Thgz4QTrZXhaCB31Rppd=nA+pzbCM0QCV1KkMOKa83orgg@mail.gmail.com>
References: <CAMX1Thi1aXm49c7c9UUHKorEQn-kh6Y6qrAwcu_TQFUF=+VQ6Q@mail.gmail.com>
	<CAMX1Thi3iHzLbza68nxfpiHs2Rw-xN-fXfbRU3FXg3OBXUnZyQ@mail.gmail.com>
	<4f884e1e-99fb-f29a-4ee6-f7c0fa039331@aklaver.com>
	<CAMX1Thgz4QTrZXhaCB31Rppd=nA+pzbCM0QCV1KkMOKa83orgg@mail.gmail.com>

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.klaver@aklaver.com 



-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (13+ messages)  latest in thread

Message-ID: <9f505de4-440d-f4c8-4f8a-70e7abd0ed00@aklaver.com>
Permalink:  ../9f505de4-440d-f4c8-4f8a-70e7abd0ed00@aklaver.com/
Also on:    postgresql.org/message-id/9f505de4-440d-f4c8-4f8a-70e7abd0ed00@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, lars.vonk@gmail.com
  Subject: Re: Missing rows after migrating from postgres 11 to 12 with logical replication
  In-Reply-To: <9f505de4-440d-f4c8-4f8a-70e7abd0ed00@aklaver.com>
  References: <CAMX1Thi1aXm49c7c9UUHKorEQn-kh6Y6qrAwcu_TQFUF=+VQ6Q@mail.gmail.com> <CAMX1Thi3iHzLbza68nxfpiHs2Rw-xN-fXfbRU3FXg3OBXUnZyQ@mail.gmail.com> <4f884e1e-99fb-f29a-4ee6-f7c0fa039331@aklaver.com> <CAMX1Thgz4QTrZXhaCB31Rppd=nA+pzbCM0QCV1KkMOKa83orgg@mail.gmail.com> <9f505de4-440d-f4c8-4f8a-70e7abd0ed00@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox