Re: Synchronizing slots from primary to standby

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: Synchronizing slots from primary to standby
Date: 2024-01-24 04:09:01
Message-ID: CAA4eK1LJxPmzBx8y==h3gLJTW7uFsMdaV2D7dhuAqQsb1=d5Fw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 24, 2024 at 8:52 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Here are some comments for patch v66-0001.
>
> ======
> doc/src/sgml/catalogs.sgml
>
> 1.
> + <para>
> + If true, the associated replication slots (i.e. the main slot and the
> + table sync slots) in the upstream database are enabled to be
> + synchronized to the physical standbys
> + </para></entry>
>
> /physical standbys/physical standby/
>
> I wondered if it is better just to say singular "standby" instead of
> "standbys" in places like this; e.g. plural might imply cascading for
> some readers.
>

I don't think it is confusing as we used in a similar way in docs. We
can probably avoid using physical in places similar to above as that
is implied

>
>
> ======
> src/backend/replication/slotfuncs.c
>
> 11. create_physical_replication_slot
>
> /* acquire replication slot, this will check for conflicting names */
> ReplicationSlotCreate(name, false,
> - temporary ? RS_TEMPORARY : RS_PERSISTENT, false);
> + temporary ? RS_TEMPORARY : RS_PERSISTENT, false,
> + false);
>
> Having an inline comment might be helpful here instead of passing "false,false"
>
> SUGGESTION
> ReplicationSlotCreate(name, false,
> temporary ? RS_TEMPORARY : RS_PERSISTENT, false,
> false /* failover */);
>

I don't think we follow to use of inline comments. I feel that
sometimes makes code difficult to read considering when we have
multiple such parameters.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2024-01-24 05:10:41 Re: Synchronizing slots from primary to standby
Previous Message Peter Smith 2024-01-24 03:21:53 Re: Synchronizing slots from primary to standby