Re: walsender bug: stuck during shutdown - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: walsender bug: stuck during shutdown
Date
Msg-id f03b4b5e-5058-1cbc-f4f7-98b28fdbfa60@oss.nttdata.com
Whole thread Raw
In response to Re: walsender bug: stuck during shutdown  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: walsender bug: stuck during shutdown  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers

On 2020/11/26 3:45, Alvaro Herrera wrote:
> On 2020-Nov-25, Fujii Masao wrote:
> 
>> But whether MyWalSnd->write is InvalidRecPtr or not, if it's behind sentPtr,
>> walsender should keep waiting for the ack to all the sent message to be
>> replied, i.e., isn't this expected behavior of normal shutdown?  That is,
>> if we want to shutdown walsender even when the client side doesn't
>> reply message, immediate shutdown should be used or the client side
>> should be terminated, instead?
> 
> I don't think "waiting forever" can be considered the expected behavior;
> this has caused what are nominally production outages several times
> already, since we sent a shutdown signal to the server and it never
> completed shutting down.

On the second thought, walsender doesn't wait forever unless
wal_sender_timeout is disabled, even in the case in discussion?
Or if there is the case where wal_sender_timeout doesn't work expectedly,
we might need to fix that at first.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



pgsql-hackers by date:

Previous
From: Kasahara Tatsuhito
Date:
Subject: Re: autovac issue with large number of tables
Next
From: "tsunakawa.takay@fujitsu.com"
Date:
Subject: RE: POC: postgres_fdw insert batching