Re: Logical replication keepalive flood

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: amit(dot)kapila16(at)gmail(dot)com
Cc: gregn4422(at)gmail(dot)com, Hou(at)gmail(dot)com, Hou(at)gmail(dot)com, houzj(dot)fnst(at)fujitsu(dot)com, andres(at)anarazel(dot)de, abbas(dot)butt(at)enterprisedb(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, zahid(dot)iqbal(at)enterprisedb(dot)com, smithpb2250(at)gmail(dot)com
Subject: Re: Logical replication keepalive flood
Date: 2021-10-01 09:12:05
Message-ID: 20211001.181205.1160679453517026787.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Thu, 30 Sep 2021 17:07:08 +0530, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote in
> On Thu, Sep 30, 2021 at 1:26 PM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> > If the comment describes the objective correctly, the only possible
> > impact would be that there may be a case where server responds a bit
> > slowly for a shutdown request. But I'm not sure it is definitely
> > true.
> >
>
> So, we should try to find how wal sender shutdown is dependent on
> sending keep alive and second thing is what about sync rep case? I
> think in the worst case that also might delay. Why do you think that
> would be acceptable?

Mmm. AFAICS including the history of the code, the problem to fix
looks like to be pthat logical wal receiver doesn't send a flush
response spontaneously. As far as receiver doesn't do that and unless
we allow some delay of the response, sender inevitably needs to ping
frequently until the wanted respons returns.

It seems to me that it is better to make the receiver send a response
at flush LSN movement spontaneously rather than tweaking the keepalive
sending mechanism. But letting XLogFlush trigger lsn_mapping
processing does not seem simple..

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Artur Zakirov 2021-10-01 09:55:37 Re: Eval expression R/O once time (src/backend/executor/execExpr.c)
Previous Message Dilip Kumar 2021-10-01 09:11:46 Re: Toast compression method options