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

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: How to debug logical replication error "columns are missing" if they are not
Дата
Msg-id ceb2b879-2f4f-2582-af02-c04d031a2fb7@gmx.net
обсуждение исходный текст
Ответ на How to debug logical replication error "columns are missing" if they are not  (Thomas Kellerer <shammat@gmx.net>)
Список 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




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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: How to debug logical replication error "columns are missing" if they are not
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: How to debug logical replication error "columns are missing" if they are not