Re: pg_recvlogical cannot create slots with failover=true
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Amit Kapila <amit.kapila16@gmail.com>, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2025-06-17T18:19:55Z
Lists: pgsql-hackers
Attachments
- v1-0001-pg_recvlogical-Rename-two-phase-and-failover-opti.patch (application/octet-stream) patch v1-0001
On Tue, Jun 17, 2025 at 12:59 AM Peter Eisentraut <peter@eisentraut.org> wrote: > > On 14.06.25 07:26, Amit Kapila wrote: > > On Sat, Jun 14, 2025 at 3:11 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > >> > >> On Thu, Jun 12, 2025 at 10:42 PM Peter Eisentraut <peter@eisentraut.org> wrote: > >>>>> > >>>>> - The <option>--two-phase</option> and <option>--falover</option> options > >>>>> + The <option>--two-phase</option> and <option>--failover</option> options > >>>> > >>>> Thank you for the report and the patch! Pushed. > >>> > >>> I wonder if the option name --failover is ideal. To me, it sounds like > >>> an action "do a failover!". Also consider that pg_recvlogical has other > >>> action options such as --start and --create-slot, so it sounds a bit > >>> like those. > >> > >> Fair point. > >> > >>> Maybe something like --enable-failover would be better? > >> > >> Sounds better, but probably the --two-phase option has the same issue? > >> > > > > Ideally, we should change both to maintain consistency across various > > slot options. OTOH, as we have already described these options as: " > > The --two-phase and --failover options can be specified with > > --create-slot.", it is clear that these are slot options. The previous > > version docs have a description: "The --two-phase can be specified > > with --create-slot to enable decoding of prepared transactions." which > > makes it even more clear that the two-phase is a slot option. The > > options are named similarly in pg_create_logical_replication_slot API > > and during CREATE SUBSCRIPTION, so, to some level, there is a > > consistency in naming of these options across all APIs/tools. But, > > their usage in a tool like pg_recvlogical could be perceived > > differently as well, so it is also okay to consider naming them > > differently. > > Also note that we have a new pg_createsubscriber --enable-two-phase. Yeah, I also noticed the precedent. > It would be nice if there was more consistency between similar/related > tools. I've attached the patch. Feedback is very welcome. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
Commits
-
pg_recvlogical: Rename --two-phase and --failover options.
- 6d12d5a433c9 18.0 landed
-
doc: Fix a typo in pg_recvlogical documentation.
- a13d49014dea 18.0 landed
-
pg_recvlogical: Add --failover option.
- cf2655a9029a 18.0 landed