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

From: "Takamichi Osumi (Fujitsu)" <osumi(dot)takamichi(at)fujitsu(dot)com>
To: 'Kyotaro Horiguchi' <horikyota(dot)ntt(at)gmail(dot)com>, "amit(dot)kapila16(at)gmail(dot)com" <amit(dot)kapila16(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "smithpb2250(at)gmail(dot)com" <smithpb2250(at)gmail(dot)com>, "vignesh21(at)gmail(dot)com" <vignesh21(at)gmail(dot)com>, "shveta(dot)malik(at)gmail(dot)com" <shveta(dot)malik(at)gmail(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>, "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, "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-02-02 08:03:55
Message-ID: TYCPR01MB83730A45925B9680C40D92AFEDD69@TYCPR01MB8373.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wednesday, February 1, 2023 5:40 PM Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> At Wed, 1 Feb 2023 08:38:11 +0530, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> wrote in
> > On Wed, Feb 1, 2023 at 8:13 AM Kyotaro Horiguchi
> > <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> > >
> > > At Tue, 31 Jan 2023 15:12:14 +0530, Amit Kapila
> > > <amit(dot)kapila16(at)gmail(dot)com> wrote in
> > > > So, shall we check if the result of parse_int is in the range 0
> > > > and PG_INT32_MAX to ameliorate this concern?
> > >
> > > Yeah, it is exactly what I wanted to suggest.
> > >
> > > > If this works then we need to
> > > > probably change the return value of defGetMinApplyDelay() to int32.
> > >
> > > I didn't thought doing that, int can store all values in the valid
> > > range (I'm assuming we implicitly assume int >= int32 in bit width)
> > > and it is the natural integer in C. Either will do for me but I
> > > slightly prefer to use int there.
> > >
> >
> > I think it would be clear to use int32 because the parameter where we
> > store the return value is also int32.
>
> I'm fine with that.
Thank you for confirming.

Attached the updated patch v26 accordingly.
I slightly adjusted the comments in defGetMinApplyDelay
on this point as well.

Best Regards,
Takamichi Osumi

Attachment Content-Type Size
v26-0001-Time-delayed-logical-replication-subscriber.patch application/octet-stream 81.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Takamichi Osumi (Fujitsu) 2023-02-02 08:18:49 RE: Time delayed LR (WAS Re: logical replication restrictions)
Previous Message Antonin Houska 2023-02-02 07:01:54 Re: RLS makes COPY TO process child tables