Re: Replication server timeout patch
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, Josh Berkus <josh@agliodbs.com>, pgsql-hackers@postgresql.org
Date: 2011-03-30T01:30:48Z
Lists: pgsql-hackers
On Wed, Mar 30, 2011 at 1:04 AM, Robert Haas <robertmhaas@gmail.com> wrote: >> COMMERROR exists to keep us from trying to send an error report down a >> failed socket. I would assume (perhaps wrongly) that >> walsender/walreceiver don't try to push error reports across the socket >> anyway, only to the postmaster log. If correct, there is no need for >> COMMERROR, and using it just muddies the code. > > I don't think that's how it works. The error the server sends is > copied into some of the messages in the client log, which is really > useful for debugging. > > ERROR: can't connect to the server (server said: you're not authorized) > > ...or something like that. Yes. Walsender sends its error message to walreceiver, and walreceiver writes it down to the server log. For example; FATAL: could not receive data from WAL stream: FATAL: requested WAL segment 000000010000000000000016 has already been removed The second FATAL message is sent from walsender. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center