When should we bump the logical replication protocol version?

Поиск
Список
Период
Сортировка
От houzj.fnst@fujitsu.com
Тема When should we bump the logical replication protocol version?
Дата
Msg-id OS0PR01MB571662ED6D4E6164B7D1E4D294439@OS0PR01MB5716.jpnprd01.prod.outlook.com
обсуждение исходный текст
Список pgsql-hackers
Hi,

When implementing the feature to perform streaming logical transactions by
background workers[1], we plan to extend the LOGICAL_REP_MSG_STREAM_ABORT message
to send the additional "abort_lsn" and "abort_time" so that we can advance the
origin lsn in subscriber and can restart streaming from correct position in
case of crash.

Since the LOGICAL_REP_MSG_STREAM_ABORT message is changed, we planned to bump
the logical replication protocol version. But when reviewing the code, we feel
it can also work without using a new protocol version if we check the
new streaming option value called('parallel'). On publisher, we can check if
the streaming option is set the new value('parallel') and only send extra abort
information in this case.

I think it's reasonable to bump the protocol version number if we change any
protocol message even if we only add some new fields to the existing message,
and that's what we've always done.

The only personal concern is that I didn't find any documentation that clearly
stated the standard about when to bump logical replication protocol version,
which makes me a little unsure if this is the right thing to do.

So, I'd like to confirm is it OK to modify or add some fields without bumping
the protocol version ? Or it's a standard to bump it if we change any
protocol message.

Any hints will be appreciated.

[1] https://www.postgresql.org/message-id/CAA4eK1%2BwyN6zpaHUkCLorEWNx75MG0xhMwcFhvjqm2KURZEAGw%40mail.gmail.com

Best regards,
Hou zj



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: pg15b3: recovery fails with wal prefetch enabled
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Switching XLog source from archive to streaming when primary available