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: Thu, 24 Dec 2020 13:40:30 -0800
Message-ID: <f74ba06d-199c-a7f1-a31b-45648ce1b065@aklaver.com> (raw)
In-Reply-To: <CAMX1ThiQAWF+-h4gCjXF1Ev==xGJ_5ie5JfyBvKuarmGEJc_uw@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>
	<9f505de4-440d-f4c8-4f8a-70e7abd0ed00@aklaver.com>
	<CAMX1ThgHK4i86qRy8aCqGbnW8VJz-wTQg5ugPA1SZaTG3B_UzA@mail.gmail.com>
	<5b0a4d0d-651e-dd4b-07c2-b66a3a0e68b3@aklaver.com>
	<CAMX1ThjgOoov2pdDz+FMQPRRR5OBc-V4NX+NkfFsqQX9ZtOpcQ@mail.gmail.com>
	<c28075be-b018-3944-4ecb-31ac5b8e2ce4@aklaver.com>
	<CAMX1ThheKfA5oOw9_3WQx+MxHy0ti6La6cwrijh6YzG-rWZ4zA@mail.gmail.com>
	<916ca797-70a3-861f-b019-0d1f9a131b4a@aklaver.com>
	<CAMX1ThiQAWF+-h4gCjXF1Ev==xGJ_5ie5JfyBvKuarmGEJc_uw@mail.gmail.com>

On 12/24/20 12:24 PM, Lars Vonk wrote:
> Well thanks for taking the time anyway. Indeed next time reduce the 
> parts is a good idea.
> 
> I would still expect though that if a logical replica misses a WAL it 
> would stop replicating (and / or report an inconsistent state). I know 
> this is the case with binary replication (it stops replication).
> As a last question, do you know if this is also the case with logical 
> replication as well, or is what happened here an "expected outcome" when 
> a logical replica misses a WAL?

It is still not clear to me what of the process was complaining about 
the WAL. Without knowing that any answer as to what effect it had would 
just be pulled out of thin air.

As to logical replication and WAL read this thread(I thought I 
remembered a previous discussion on this, took me a bit to pull it up):

https://www.postgresql.org/message-id/CAGvVEFvq_VM9LhYPeu%2BUw__gEVvrBffGL%3DFO-88cZEp-35%2BarA%40ma...

> 
> Lars
> 
> On Thu, Dec 24, 2020 at 5:52 PM Adrian Klaver <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 12/23/20 1:40 AM, Lars Vonk wrote:
>      > The full setup is:
>      >
>      > **Before:
>      > 11 primary -> 11 hotstandby binary
>      >
>      > **During migration
>      > 11 primary -> 11 hotstandby binary
>      >    | -> 12 new instance via logical
>      >            |-> 12 new replica via binary
>      >
>      > **After migration
>      > 12 primary
>      > |-> 12 replica via binary
>      >
>      >
> 
>     There are several moving parts here. I have to believe the problem is
>     related. Just not sure how to figure it out after the fact. The best I
>     can come up with is retry the process and monitor closely in real or
>     near real time to see if you can catch the issue. Another option is to
>     reduce the parts count by not running the binary 12 --> 12 replication
>     at the same time you are doing the 11 --> 12 logical replication.
> 
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (13+ messages)

Message-ID: <f74ba06d-199c-a7f1-a31b-45648ce1b065@aklaver.com>
Permalink:  ../f74ba06d-199c-a7f1-a31b-45648ce1b065@aklaver.com/
Also on:    postgresql.org/message-id/f74ba06d-199c-a7f1-a31b-45648ce1b065@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: <f74ba06d-199c-a7f1-a31b-45648ce1b065@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> <CAMX1ThgHK4i86qRy8aCqGbnW8VJz-wTQg5ugPA1SZaTG3B_UzA@mail.gmail.com> <5b0a4d0d-651e-dd4b-07c2-b66a3a0e68b3@aklaver.com> <CAMX1ThjgOoov2pdDz+FMQPRRR5OBc-V4NX+NkfFsqQX9ZtOpcQ@mail.gmail.com> <c28075be-b018-3944-4ecb-31ac5b8e2ce4@aklaver.com> <CAMX1ThheKfA5oOw9_3WQx+MxHy0ti6La6cwrijh6YzG-rWZ4zA@mail.gmail.com> <916ca797-70a3-861f-b019-0d1f9a131b4a@aklaver.com> <CAMX1ThiQAWF+-h4gCjXF1Ev==xGJ_5ie5JfyBvKuarmGEJc_uw@mail.gmail.com> <f74ba06d-199c-a7f1-a31b-45648ce1b065@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