public inbox for [email protected]  
help / color / mirror / Atom feed
From: Amit Kapila <[email protected]>
To: Zhijie Hou (Fujitsu) <[email protected]>
Cc: Bertrand Drouvot <[email protected]>
Cc: shveta malik <[email protected]>
Cc: Ajin Cherian <[email protected]>
Cc: Masahiko Sawada <[email protected]>
Cc: Dilip Kumar <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Nisha Moond <[email protected]>
Cc: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Ashutosh Sharma <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Subject: Re: Synchronizing slots from primary to standby
Date: Sat, 27 Jan 2024 09:13:15 +0530
Message-ID: <CAA4eK1+3jV839U3+DGgHrgrhtDguaVwAyb0Hucz9UbpjjVL=Sg@mail.gmail.com> (raw)
In-Reply-To: <OS0PR01MB571623B1D01003F99A7BB983947A2@OS0PR01MB5716.jpnprd01.prod.outlook.com>
References: <[email protected]>
	<CAJpy0uBc6H22RbNVU213AZ_BPw+uDptcTVHakKegpTCv74yN=w@mail.gmail.com>
	<CAA4eK1JZDtRFPJaeaLvj74760pcvaEAVxNPN0+oW5A4jL1WCBg@mail.gmail.com>
	<[email protected]>
	<CAA4eK1JPB-zpGYTbVOP5Qp26tNQPMjDuYzNZ+a9RFiN5nE1tEA@mail.gmail.com>
	<CAJpy0uAmbh_1pH-eG5bTbHXXq9w-uNV45DT-12TTh9kGj2HeCw@mail.gmail.com>
	<CAFPTHDbsZ+pxAubb9d9BwVNt5OB3_2s77bG6nHcAgUPPhEVmMQ@mail.gmail.com>
	<CAJpy0uBqS_HD30mBR0yD1SVCvUZDrw1=dwn1xH8ANEQw7gnPdw@mail.gmail.com>
	<CAA4eK1Lxvfq9RwOEsguiMCrKPUc1He9UGz1_wi0N0cJaXFa4Eg@mail.gmail.com>
	<OS0PR01MB5716E304C26E6ACE0BE84925947A2@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<[email protected]>
	<CAA4eK1K0jRXa2AhKXRVDY+Y42MG4RTbfAEcTBEGN2ov=Yjco+A@mail.gmail.com>
	<OS0PR01MB571623B1D01003F99A7BB983947A2@OS0PR01MB5716.jpnprd01.prod.outlook.com>

On Thu, Jan 25, 2024 at 6:42 PM Zhijie Hou (Fujitsu)
<[email protected]> wrote:
>
> Here is the V69 patch set which includes the following changes.
>
> V69-0001, V69-0002
>

Few minor comments on v69-0001
1. In libpqrcv_create_slot(), I see we are using two types of syntaxes
based on 'use_new_options_syntax' (aka server_version >= 15) whereas
this new 'failover' option doesn't follow that. What is the reason of
the same? I thought it is because older versions anyway won't support
this option. However, I guess we should follow the syntax of the old
server and let it error out. BTW, did you test this patch with old
server versions (say < 15 and >=15) by directly using replication
commands, if so, what is the behavior of same?

2.
  }
-
+ if (failover)
+ appendStringInfoString(&cmd, "FAILOVER, ");

Spurious line removal. Also, to follow a coding pattern similar to
nearby code, let's have one empty line after handling of failover.

3.
+/* ALTER_REPLICATION_SLOT slot */
+alter_replication_slot:
+ K_ALTER_REPLICATION_SLOT IDENT '(' generic_option_list ')'

I think it would be better if we follow the create style by specifying
syntax in comments as that can make the code easier to understand
after future extensions to this command if any. See
create_replication_slot:
/* CREATE_REPLICATION_SLOT slot [TEMPORARY] PHYSICAL [options] */
K_CREATE_REPLICATION_SLOT IDENT opt_temporary K_PHYSICAL create_slot_options

-- 
With Regards,
Amit Kapila.





view thread (119+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Synchronizing slots from primary to standby
  In-Reply-To: <CAA4eK1+3jV839U3+DGgHrgrhtDguaVwAyb0Hucz9UbpjjVL=Sg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox