Move replication slot structures/enums/macros to a new header file for better usability by external tools/modules

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Move replication slot structures/enums/macros to a new header file for better usability by external tools/modules
Date: 2022-02-07 05:22:08
Message-ID: CALj2ACW82S41r41K9gq+MA=NC1O5+C=RHjyjhw3PM9irseVJBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While working on pg_replslotdata tool [1], it was observed that some
of the replication slot structures/enums/macros such as
ReplicationSlotPersistentData, ReplicationSlotPersistency,
ReplicationSlotOnDisk, ReplicationSlotOnDiskXXXX etc. are currently in
replication/slot.h and replication/slot.c. This makes the replication
slot on disk data structures unusable by the external tools/modules.
How about moving these structures to a new header file called
slot_common.h as attached in the patch here?

Thoughts?

PS: I'm planning to have the tool separately, as it was rejected to be in core.

[1] https://www.postgresql.org/message-id/CALj2ACW0rV5gWK8A3m6_X62qH%2BVfaq5hznC%3Di0R5Wojt5%2Byhyw%40mail.gmail.com

Regards,
Bharath Rupireddy.

Attachment Content-Type Size
v1-0001-Add-new-header-file-for-replication-slot-common-d.patch application/x-patch 9.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2022-02-07 05:26:17 Re: Make relfile tombstone files conditional on WAL level
Previous Message Valli Annamalai 2022-02-07 05:15:12 Query choosing Bad Index Path