Streaming Replication Protocol and Logical Replication

Поиск
Список
Период
Сортировка
От Greg Rychlewski
Тема Streaming Replication Protocol and Logical Replication
Дата
Msg-id CAKemG7Wn1tUQ9QccSGnz_BdUmqhWAUWnha4DpNijbK_4dbc7eQ@mail.gmail.com
обсуждение исходный текст
Список pgsql-novice
Hi,

I am writing something to interpret the XLogData messages sent during logical replication. I want to record the position of the WAL records I have previously processed so that if I need to restart replication I can skip to the first WAL record I haven't processed.

If I'm understanding the documentation correctly, adding the 2 values below will give me the latest byte offset I have processed. So adding 1 to their sum will tell me where I can start replication.

1. Int64 - The starting point of the WAL data in this message.
2. Byten - A section of the WAL data stream.

So my questions are:
1. Assuming no continuation records, is my understanding above correct?
2. If there are continuation records, do those have the same "starting point of WAL data in this message" as the main record? If yes, is there some way to use the protocol to determine when messages are continuations of each other?

Thank you

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Table-Level Locks and Transactions
Следующее
От: Alex R
Дата:
Сообщение: JSONpath query that returns paths to the matches