RE: [Patch] add new parameter to pg_replication_origin_session_setup
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Doruk Yilmaz' <doruk@mixrank.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-22T05:50:06Z
Lists: pgsql-hackers
Dear Doruk, > That sounds reasonable. I’ve updated the patch and added more > information to the documentation covering the topics you mentioned. > I also added a Caution block so potential users won’t miss it. I hope > this patch meets your expectations. Can you explain more why we must extend the SQL interface? I read your use case [1], and looks like that a new type of background worker is introduced in your system. If so, why doesn't the worker directly call C-lang interface replorigin_session_setup()? Personally considered, SQL functions are usable by unfamiliar users so that this change may be dangerous. It is better if developers can use C APIs instead. [1]: https://www.postgresql.org/message-id/CAMPB6wckvkKrXVPH5j8Ske2cVedkb-TRLdnOb5e74zYM1CynGw%40mail.gmail.com Best regards, Hayato Kuroda FUJITSU LIMITED
Commits
-
Refactor replorigin_session_setup() for better readability.
- 735e8fe68535 19 (unreleased) landed
-
Prevent unintended dropping of active replication origins.
- e385a4e2fd8e 19 (unreleased) landed
-
Add optional pid parameter to pg_replication_origin_session_setup().
- 5b148706c5c8 19 (unreleased) landed