Re: Inconsistent DB data in Streaming Replication - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Inconsistent DB data in Streaming Replication
Date
Msg-id 20130419124601.GA31466@svana.org
Whole thread Raw
In response to Re: Inconsistent DB data in Streaming Replication  (Florian Pflug <fgp@phlo.org>)
Responses Re: Inconsistent DB data in Streaming Replication
List pgsql-hackers
On Wed, Apr 17, 2013 at 12:49:10PM +0200, Florian Pflug wrote:
> Fixing this on the receive side alone seems quite messy and fragile.
> So instead, I think we should let the master send a shutdown message
> after it has sent everything it wants to send, and wait for the client
> to acknowledge it before shutting down the socket.
>
> If the client fails to respond, we could log a fat WARNING.

ISTM the master should half close the socket, using shutdown(). That
way the client receives an EOF and can still then send its reply to the
master.  Then when the master receives that it can close() completely.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.  -- Arthur Schopenhauer

pgsql-hackers by date:

Previous
From: Rushabh Lathia
Date:
Subject: elog() error, trying CURENT OF with foreign table
Next
From: Robert Haas
Date:
Subject: Re: Recovery target 'immediate'