Re: Postgresql 11: terminating walsender process due to replication timeout

From: Abhishek Bhola <abhishek(dot)bhola(at)japannext(dot)co(dot)jp>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql 11: terminating walsender process due to replication timeout
Date: 2021-09-10 07:55:48
Message-ID: CAEDsCzjEHLxgqa4d563CKFwSbgBvvnM91Cqfq_qoZDXCkyOsiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

So is there any solution to this issue?
I did try to increase the wal_sender_timeout and it broke the pub/sub.
I increased the wal_receiver_timeout and it wouldn't attempt to restart the
subscription until that time elapsed.
Due to that, the WAL segments got removed by the time it came up again and
it stopped working.
So given that the publisher is publishing at a higher rate than the
subscriber is subscribing, what can be done?

On Fri, Sep 10, 2021 at 9:26 AM Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
wrote:

> At Thu, 9 Sep 2021 16:06:25 +0900, Abhishek Bhola <
> abhishek(dot)bhola(at)japannext(dot)co(dot)jp> wrote in
> > sourcedb:~$ postgres --version
> > postgres (PostgreSQL) 11.6
> >
> > Sorry for missing this information.
> > But looks like this fix is already included in the version I am running.
>
> Ok. I'm not sure but there may be a case where too-busy (or too poor
> relative to the publisher) subscriber cannot send a response for a
> long time. Usually keep-alive packets sent from publisher causes
> subscriber response even while busy time but it seems that if
> subscriber applies changes more than two times slower than the
> publisher sends, subscriber doesn't send a response in the timeout
> window.
>
> regards.
>
> --
> Kyotaro Horiguchi
> NTT Open Source Software Center
>

--
_This correspondence (including any attachments) is for the intended
recipient(s) only. It may contain confidential or privileged information or
both. No confidentiality or privilege is waived or lost by any
mis-transmission. If you receive this correspondence by mistake, please
contact the sender immediately, delete this correspondence (and all
attachments) and destroy any hard copies. You must not use, disclose, copy,
distribute or rely on any part of this correspondence (including any
attachments) if you are not the intended
recipient(s).本メッセージに記載および添付されている情報(以下、総称して「本情報」といいます。)は、本来の受信者による使用のみを意図しています。誤送信等により本情報を取得された場合でも、本情報に係る秘密、または法律上の秘匿特権が失われるものではありません。本電子メールを受取られた方が、本来の受信者ではない場合には、本情報及びそのコピーすべてを削除・破棄し、本電子メールが誤って届いた旨を発信者宛てにご通知下さいますようお願いします。本情報の閲覧、発信または本情報に基づくいかなる行為も明確に禁止されていることをご了承ください。_

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2021-09-10 08:38:34 Re: How to observe plan_cache_mode transition from custom to generic plan?
Previous Message Kyotaro Horiguchi 2021-09-10 00:21:28 Re: Postgresql 11: terminating walsender process due to replication timeout