Re: Use the enum value CRS_EXPORT_SNAPSHOT instead of "0" - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Use the enum value CRS_EXPORT_SNAPSHOT instead of "0"
Date
Msg-id 20230616094751.gn7hh6veq5y2rtfo@alvherre.pgsql
Whole thread Raw
In response to Re: Use the enum value CRS_EXPORT_SNAPSHOT instead of "0"  (Masahiko Sawada <sawada.mshk@gmail.com>)
List 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 by date:

Previous
From: Peter Smith
Date:
Subject: Re: Use the enum value CRS_EXPORT_SNAPSHOT instead of "0"
Next
From: Amit Kapila
Date:
Subject: Re: Synchronizing slots from primary to standby