From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: terminating walsender process due to replication timeout
Date: Fri, 24 May 2019 09:23:50 +0300
Message-ID: <8ef8fcb4-e893-58ab-8d48-4a8d802ab5f2@matrix.gatewaynet.com> (raw)
In-Reply-To: <OFBA669EEB.6FDF62BC-ON43258403.004B492C-43258403.004D5F2C@iba.by>
References: <OF85C33E30.171C1C23-ON432583F9.003F5B16-432583F9.003FBAD7@iba.by>
<CANaGW0-7rLaetm5zBopCtYDwXSg43ZyNWMJHk9rMb+7mAOvJwA@mail.gmail.com>
<OF99D0D839.6A5BCB70-ON432583FB.0025912E-432583FB.0026D664@iba.by>
<20190516.161219.83053496.horiguchi.kyotaro@lab.ntt.co.jp>
<OFE11EC62A.504EB2B3-ON432583FD.002BE231-432583FD.002C666E@LocalDomain>
<OFBA669EEB.6FDF62BC-ON43258403.004B492C-43258403.004D5F2C@iba.by>
On 23/5/19 5:05 μ.μ., AYahorau@ibagroup.eu wrote:
> Hello Everyone!
>
> I can simplify and describe the issue I faced.
> I have 2 nodes in db cluster: master and standby.
> I create a simple table on master node by a command via psql:
> CREATE TABLE table1 (a INTEGER);
> After this I fill the table by COPY command from a file which contains 2000000 (2 million) entries.
>
> And in case when I run for example such a command:
> UPDATE table1 SET a='1'
> or such a command:
> DELETE FROM table1;
> I see in PostgreSQL log the an entry: terminating walsender process due to replication timeout.
>
> I suppose that this issue caused by small value of wal_sender_timeout=1s and long runtime of the queries (it takes about 15 seconds).
>
> What is the best way to proceed it? How to avoid this? Is there any additional configuration which can help here?
I have set mine to 15min. No problems for over 7 months, knock on wood.
>
>
> Regards,
> Andrei
>
>
>
> From: Andrei Yahorau/IBA
> To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>,
> Cc: pgsql-general@postgresql.org, rene.romero.b@gmail.com
> Date: 17/05/2019 11:04
> Subject: Re: terminating walsender process due to replication timeout
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> Hello.
>
> Thanks for the answer.
>
> Can frequent database operations cause getting a standby server behind? Is there a way to avoid this situation?
> I checked that walsender works well in my test if I set wal_sender_timeout at least to 5 second.
>
> Best regards,
> Andrei Yahorau
>
>
>
>
> From: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
> To: AYahorau@ibagroup.eu,
> Cc: rene.romero.b@gmail.com, pgsql-general@postgresql.org
> Date: 16/05/2019 10:36
> Subject: Re: terminating walsender process due to replication timeout
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
>
> Hello.
>
> At Wed, 15 May 2019 10:04:12 +0300, AYahorau@ibagroup.eu wrote in <OF99D0D839.6A5BCB70-ON432583FB.0025912E-432583FB.0026D664@iba.by>
> > Hello,
> > Thank You for the response.
> >
> > Yes that's possible to monitor replication delay. But my questions were
> > not about monitoring network issues.
> >
> > I use exactly wal_sender_timeout=1s because it allows to detect
> > replication problems quickly.
>
> Though I don't have an exact idea of your configuration, it seems
> to me that your standby is simply getting behind more than one
> second from the master. If you regard the fact as a problem of
> replication, the configuration can be said to be finding the
> problem correctly.
>
> Since the keep-alive packet is sent in-band, it doesn't get to
> the standby before already-sent-but-not-processed packets.
>
> > So, I need clarification to the following questions:
> > Is it possible to use exactly this configuration and be sure that it will
> > be work properly.
> > What did I do wrong? Should I correct my configuration somehow?
> > Is this the same issue as mentioned here:
> > https://www.postgresql.org/message-id/e082a56a-fd95-a250-3bae-0fff93832510@2ndquadrant.com
> > ? If it is so, why I do I face this problem again?
>
> It is not the same "problem". What was mentioned there is fast
> network making the sender-side loop busy, which prevents
> keepalive packet from sending.
>
> regards.
>
> --
> Kyotaro Horiguchi
> NTT Open Source Software Center
>
>
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: achill@matrix.gatewaynet.com
Subject: Re: terminating walsender process due to replication timeout
In-Reply-To: <8ef8fcb4-e893-58ab-8d48-4a8d802ab5f2@matrix.gatewaynet.com>
References: <OF85C33E30.171C1C23-ON432583F9.003F5B16-432583F9.003FBAD7@iba.by> <CANaGW0-7rLaetm5zBopCtYDwXSg43ZyNWMJHk9rMb+7mAOvJwA@mail.gmail.com> <OF99D0D839.6A5BCB70-ON432583FB.0025912E-432583FB.0026D664@iba.by> <20190516.161219.83053496.horiguchi.kyotaro@lab.ntt.co.jp> <OFE11EC62A.504EB2B3-ON432583FD.002BE231-432583FD.002C666E@LocalDomain> <OFBA669EEB.6FDF62BC-ON43258403.004B492C-43258403.004D5F2C@iba.by> <8ef8fcb4-e893-58ab-8d48-4a8d802ab5f2@matrix.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox