RE: Logical replication timeout problem

From: "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com>
To: "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Fabrice Chapuis <fabrice636861(at)gmail(dot)com>, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, Petr Jelinek <petr(dot)jelinek(at)enterprisedb(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ajin Cherian <itsajin(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>
Subject: RE: Logical replication timeout problem
Date: 2022-03-09 02:27:35
Message-ID: OS3PR01MB6275326AC418BCE68458EE0F9E0A9@OS3PR01MB6275.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 8, 2022 at 4:48 PM Kuroda, Hayato/黒田 隼人 <kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
> Thank you for updating the patch! Good self-reviewing.
Thanks for your comments.

> > And I looked into the function WalSndUpdateProgress. I found function
> > WalSndUpdateProgress try to record the time of some message(by
> > function
> > LagTrackerWrite) sent to subscriber, such as in function pgoutput_commit_txn.
>
> Yeah, I think you are right.
>
> > Then, when publisher receives the reply message from the
> > subscriber(function ProcessStandbyReplyMessage), publisher invokes
> > LagTrackerRead to calculate the delay time(refer to view
> > pg_stat_replication).
> > Referring to the purpose of LagTrackerWrite, I think it is no need to
> > log time when sending keepalive messages here.
> > So when the parameter send_keep_alive of function WalSndUpdateProgress
> > is true, skip the recording time.
>
> I also read them. LagTracker records the elapsed time between sending commit
> from publisher and receiving reply from subscriber, right? It seems good.
Yes.

> Do we need adding a test for them? I think it can be added to 100_bugs.pl.
> Actually I tried to send PoC, but it does not finish to implement that.
> I'll send if it is done.
I'm not sure if it is worth it.
Because the reproduced test of this bug might take some time and might risk
making the build farm slow, so I am not sure if others would like the
reproduced test of this bug.

Regards,
Wang wei

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-03-09 02:32:35 Re: Naming of the different stats systems / "stats collector"
Previous Message wangw.fnst@fujitsu.com 2022-03-09 02:26:14 RE: Logical replication timeout problem