Re: ACK from walreceiver to walsender - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: ACK from walreceiver to walsender
Date
Msg-id 4B46F2F8.3080807@enterprisedb.com
Whole thread Raw
In response to ACK from walreceiver to walsender  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: ACK from walreceiver to walsender  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Fujii Masao wrote:
> Hi Heikki,
> 
> http://git.postgresql.org/gitweb?p=users/heikki/postgres.git;a=commit;h=ebaa89ce8906e0ec45f105d083a0360b1f8bc7ca
> 
> You dropped all the ACKs from walreceiver to walsender. I have no objection
> to that, but I think that walsender should handle at least 'X' (which means
> that the standby is closing down the socket) and EOF (which means unexpected
> loss of standby connection) messages from walreceiver. Otherwise, walsender
> might be unable to detect the shutdown of walreceiver for a while.

Yeah, I just noticed that myself :-(. I guess we'll still have to use
select() in the walreceiver loop to detect that then.

I don't think we need to treat 'X' differently from EOF. You get an
error anyway if the write() fails. That's actually a bit annoying, you
get a "could not send data to client" error in the log every time a
standby disconnects for any reason.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Nikhil Sontakke
Date:
Subject: Why doesn't query_tree_walker examine the intoClause field?
Next
From: Dimitri Fontaine
Date:
Subject: Re: damage control mode