Re: Logical subscription / publication lifetimes

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Logical subscription / publication lifetimes
Дата
Msg-id CAKFQuwb3QzPfHsHr48nmst6LwW4Ui9SOWiK1YaNCddidsp50Yg@mail.gmail.com
обсуждение исходный текст
Ответ на Logical subscription / publication lifetimes  (andrew cooke <andrew@acooke.org>)
Ответы Re: Logical subscription / publication lifetimes  (andrew cooke <andrew@acooke.org>)
Список pgsql-general
On Fri, Apr 22, 2022 at 5:00 AM andrew cooke <andrew@acooke.org> wrote:

If I define a publication at time Tp, then load some data on the
publisher, then start a subscription at time Ts, then load some more
data on the publisher, does the subscriber get data from Tp or Ts
onwards?


It depends.  By default, neither, the publisher is publishing the entire contents of the table and the subscriber will do everything necessary to replicate those contents in their entirety.

If you specify copy_data = false I'm not sure what you end up with initially or after disable.  My guess is the subscription defines the first transaction it cares about when it connects to the publisher, defaulting to the most recent publisher transaction (all older transactions would be handled via copy_data = true) but then so long as the slot remains active the publisher will place the data into the slot even while the subscriber is not active and the subscriber will receive all of it next time it comes online/re-enables.

David J.

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

Предыдущее
От: Willy-Bas Loos
Дата:
Сообщение: Re: logical replication worker can't find postgis function
Следующее
От: andrew cooke
Дата:
Сообщение: Re: Logical subscription / publication lifetimes