From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Subject: | Streaming replication and unfit messages |
Date: | 2010-02-18 05:17:06 |
Message-ID: | 3f0b79eb1002172117r261f5037t3224e24c24983ef9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
When the replication connection is closed unexpectedly, walsender might emit
the following unfit messages. IOW, the loss of the connection might be wrongly
regarded as an arrival of invalid message by the walsender. This looks messy.
We should get rid of that unfit FATAL message, emit a COMMERROR message and
just call proc_exit() when the loss of the connection is found?
> [2460]: LOG: could not receive data from client: No connection could be made because the target machine actively refused it.
> [2460]: FATAL: invalid standby closing message type 4
> [2460]: LOG: could not send data to client: No connection could be made because the target machine actively refused it.
Also the walsender wrongly tries to send the FATAL message to the standby even
though the connection has already been closed, and then gets the following LOG
message after the FATAL one. This FATAL message is suitable, but output of the
LOG message looks messy, too. We should use COMMERROR instead of FATAL and then
just call proc_exit() in order to prevent a message from being sent?
> [12586] FATAL: unexpected EOF on standby connection
> [12586] LOG: could not send data to client: Broken pipe
The attached patch fixes those unfit messages.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
fix_unfit_walsnd_msgs_0218.patch | text/x-patch | 2.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2010-02-18 06:23:26 | Re: Streaming replication, and walsender during recovery |
Previous Message | Tom Lane | 2010-02-18 04:34:24 | A thought: should we run pgindent now? |