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/