RE: Time delayed LR (WAS Re: logical replication restrictions)

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Peter Smith' <smithpb2250(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, "vignesh21(at)gmail(dot)com" <vignesh21(at)gmail(dot)com>, "shveta(dot)malik(at)gmail(dot)com" <shveta(dot)malik(at)gmail(dot)com>, "Takamichi Osumi (Fujitsu)" <osumi(dot)takamichi(at)fujitsu(dot)com>, "dilipbalaut(at)gmail(dot)com" <dilipbalaut(at)gmail(dot)com>, "euler(at)eulerto(dot)com" <euler(at)eulerto(dot)com>, "m(dot)melihmutlu(at)gmail(dot)com" <m(dot)melihmutlu(at)gmail(dot)com>, "marcos(at)f10(dot)com(dot)br" <marcos(at)f10(dot)com(dot)br>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Time delayed LR (WAS Re: logical replication restrictions)
Date: 2023-03-02 13:25:17
Message-ID: TYAPR01MB586606CF3B585B6F8BE13A9CF5B29@TYAPR01MB5866.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Peter,

Thank you for reviewing! PSA new version.

> 1.
> Nitpick. The new text is jagged-looking. It should wrap at ~80 chars.

Addressed.

>
> 2.
> 2. Another reason is for that parallel streaming, the transaction will be opened
> immediately by the parallel apply worker. Therefore, if the walsender
> is delayed in sending the final record of the transaction, the
> parallel apply worker must wait to receive it with an open
> transaction. This would result in the locks acquired during the
> transaction not being released until the min_send_delay has elapsed.
>
> ~
>
> The text already said there are "two reasons", and already this is
> numbered as reason 2. So it doesn't need to keep saying "Another
> reason" here.
>
> "Another reason is for that parallel streaming" --> "For parallel streaming..."

Changed.

> ======
> src/backend/replication/walsender.c
>
> 3. WalSndDelay
>
> + /* die if timeout was reached */
> + WalSndCheckTimeOut();
>
> Other nearby comments start uppercase, so this should too.

I just picked from other part and they have lowercase, but fixed.

> ======
> src/include/replication/walreceiver.h
>
> 4. WalRcvStreamOptions
>
> @@ -187,6 +187,7 @@ typedef struct
> * prepare time */
> char *origin; /* Only publish data originating from the
> * specified origin */
> + int32 min_send_delay; /* The minimum send delay */
> } logical;
> } proto;
> } WalRcvStreamOptions;
>
> ~
>
> Should that comment mention the units are "(ms)"

Added.

Best Regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment Content-Type Size
v10-0001-Time-delayed-logical-replication-on-publisher-si.patch application/octet-stream 82.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2023-03-02 13:27:16 RE: Time delayed LR (WAS Re: logical replication restrictions)
Previous Message Önder Kalacı 2023-03-02 13:20:09 Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher