Re: [HACKERS] Streaming replication and unfit messages

2010-02-18 Thread Andres Freund
On Thursday 18 February 2010 06:17:06 Fujii Masao wrote: [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

Re: [HACKERS] Streaming replication and unfit messages

2010-02-18 Thread Heikki Linnakangas
Fujii Masao wrote: 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

Re: [HACKERS] Streaming replication and unfit messages

2010-02-18 Thread Magnus Hagander
2010/2/18 Heikki Linnakangas heikki.linnakan...@enterprisedb.com: Fujii Masao wrote: 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

Re: [HACKERS] Streaming replication and unfit messages

2010-02-18 Thread Heikki Linnakangas
Magnus Hagander wrote: This cannot possibly be correct: + if (errno == EAGAIN || EWOULDBLOCK || errno == EINTR) The middle argument is missing the errno== part. Ahh, rats. Yeah it clearly is. Thanks. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com

Re: [HACKERS] Streaming replication and unfit messages

2010-02-18 Thread Fujii Masao
On Thu, Feb 18, 2010 at 7:05 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Magnus Hagander wrote: This cannot possibly be correct: +                     if (errno == EAGAIN || EWOULDBLOCK || errno == EINTR) The middle argument is missing the errno== part. Ahh, rats.

Re: [HACKERS] Streaming replication and unfit messages

2010-02-18 Thread Heikki Linnakangas
Fujii Masao wrote: * The received byte is stored in *c. Returns 1 if a byte was read, 0 if ! * if no data was available, or EOF if trouble. Typo. 'if' is repeated. + ereport(COMMERROR, +

[HACKERS] Streaming replication and unfit messages

2010-02-17 Thread Fujii Masao
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