Re: Use the enum value CRS_EXPORT_SNAPSHOT instead of "0"

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Use the enum value CRS_EXPORT_SNAPSHOT instead of "0"
Дата
Msg-id 20230616094751.gn7hh6veq5y2rtfo@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Use the enum value CRS_EXPORT_SNAPSHOT instead of "0"  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
On 2023-Jun-16, Masahiko Sawada wrote:

> The walreceiver process doesn't use CRS_EXPORT_SNAPSHOT actually,
> right? I think replacing it with CRS_EXPORT_SNAPSHOT would rather
> confuse me

libpqwalreceiver.c does use it.  But I agree -- I think it would be
better to not use the enum in walreceiver at all.  IIRC if we stopped
use of that enum in {libpq}walreceiver, then we wouldn't need
walsender.h inclusion by walreceiver files.

However, changing it means a change of the walrcv_create_slot API, so
it's not all that trivial.  But we could have a walreceiver-side enum
instead (with the same values).  I think this would be worth doing,
because it'll all end up cleaner.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



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

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: Use the enum value CRS_EXPORT_SNAPSHOT instead of "0"
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Synchronizing slots from primary to standby