pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: PostgreSQL 10.5 : Logical replication timeout results in PANIC in pg_wal "No space left on device"
Date: Tue, 13 Nov 2018 18:06:41 +0200
Message-ID: <48415b2a-ea0f-cf5e-1145-17e8797a6e79@matrix.gatewaynet.com> (raw)
In-Reply-To: <0BBC4BB3-4A59-4040-B065-82D09268A4F7@crazybean.net>
References: <ae8812c3-d138-73b7-537a-a273e15ef6e1@matrix.gatewaynet.com>
	<838a3914-a078-88eb-ee5e-4059b7d14620@matrix.gatewaynet.com>
	<0BBC4BB3-4A59-4040-B065-82D09268A4F7@crazybean.net>

On 13/11/18 5:35 μ.μ., Rui DeSousa wrote:
>
>
>> On Nov 13, 2018, at 7:00 AM, Achilleas Mantzios <achill@matrix.gatewaynet.com <mailto:achill@matrix.gatewaynet.com>> wrote:
>>
>> Is there a way for the WAL receiver to not have detected the termination of the replication stream?
>
> The teardown of the network socket on the upstream server should send a reset packet to the downstream server and at that point the WAL receiver would close its connection.  Is there any firewalls, 
> router, rules, etc between the nodes that could have dropped the packet?

No

>
>>
>> Shouldn't normally the WAL receiver detect this and try again in wal_retrieve_retry_interval ?
>
> Not really… if the connection has already been torn down; the upstream server would send another reset packet on the next request and in this case it would.  However, if request packets at not 
> reaching the upstream server; i.e. due to firewall silently dropping the packets (personally I believe firewall should always set reset packets to friendly hosts) then what happens is the TCP/IP 
> send queue builds up with the requests packets instead — a t this point waiting on the OS to terminate the connection which can day or two depending on your TCP/IP setting.
>

Again no dropping, no firewall.

> What you want to use instead is wal_receiver_timeout to detect the given case where upstream server either no longer exists or the firewall, etc is silently dropping packets.

Once again from my original message :
"while setting up logical replication since August we had seen early on the need to increase max_receiver_timeout and max_sender_timeout from 60sec to 5mins"

So with wal_receiver_timeout='5 min', the receiver never detected any timeout.

>
>


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

view thread (25+ messages)  latest in thread

Message-ID: <48415b2a-ea0f-cf5e-1145-17e8797a6e79@matrix.gatewaynet.com>
Permalink:  ../48415b2a-ea0f-cf5e-1145-17e8797a6e79@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/48415b2a-ea0f-cf5e-1145-17e8797a6e79@matrix.gatewaynet.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: achill@matrix.gatewaynet.com, pgsql-admin@lists.postgresql.org
  Subject: Re: PostgreSQL 10.5 : Logical replication timeout results in PANIC in pg_wal "No space left on device"
  In-Reply-To: <48415b2a-ea0f-cf5e-1145-17e8797a6e79@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