Re: How to debug logical replication error "columns are missing" if they are not

From: Thomas Kellerer <shammat(at)gmx(dot)net>
To: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: How to debug logical replication error "columns are missing" if they are not
Date: 2020-08-25 08:09:15
Message-ID: ceb2b879-2f4f-2582-af02-c04d031a2fb7@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Samed YILDIRIM schrieb am 25.08.2020 um 08:09:
> Have you dropped any column during or after main schema changes?
>
> If yes, you should add columns you dropped on publisher side to
> subscriber side. These two tables can be identical now. But, if you
> added a column to publisher, and then dropped it, and you never added
> the column(s) on subscriber side, you would get error. Because, you
> are looking current status of tables, but logs that should be
> consumed and data that should be replicated belong to past.

The change involved dropping two columns and adding a new one.
But the dropped columns were already present on the subscriber

The change essentially merged two date columns into a single daterange column.

So what would have been the correct approach here then?

1. Adding the new column on the subscriber
2. Let replication catch up
3. then drop the old columns on the subscriber

Regards
Thomas

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Thomas Kellerer 2020-08-25 11:34:05 Re: How to debug logical replication error "columns are missing" if they are not
Previous Message Samed YILDIRIM 2020-08-25 06:09:50 Re: How to debug logical replication error "columns are missing" if they are not