Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TW9KQ-00062Y-Ug for pgsql-hackers@postgresql.org; Wed, 07 Nov 2012 17:22:15 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TW9KN-00033y-Cn for pgsql-hackers@postgresql.org; Wed, 07 Nov 2012 17:22:14 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id D528C2860E; Wed, 7 Nov 2012 09:22:07 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id D0D86B0543; Wed, 7 Nov 2012 09:22:07 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id F21FE12199D; Wed, 7 Nov 2012 09:22:23 -0800 (PST) X-Virus-Scanned: amavisd-new at zcs-prod-ext-mta-1.vmware.com Received: from zcs-prod-ext-mta-1.vmware.com ([127.0.0.1]) by localhost (zcs-prod-ext-mta-1.vmware.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PAm02IPcgNZ0; Wed, 7 Nov 2012 09:22:23 -0800 (PST) Received: from [192.168.1.90] (unknown [10.113.62.14]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA id 0E9B4121998; Wed, 7 Nov 2012 09:22:22 -0800 (PST) Message-ID: <509A98BC.70107@vmware.com> Date: Wed, 07 Nov 2012 19:22:04 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121027 Icedove/10.0.10 MIME-Version: 1.0 To: Amit Kapila CC: Fujii Masao , pgsql-hackers@postgresql.org Subject: Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown References: <6C0B27F7206C9E4CA54AE035729E9C382853264E@szxeml509-mbs> <6C0B27F7206C9E4CA54AE035729E9C382853288B@szxeml509-mbs> <5056cb6b.29f2440a.7bd9.1633SMTPIN_ADDED@mx.google.com> <6C0B27F7206C9E4CA54AE035729E9C38285337FF@szxeml509-mbs> <506972B9.6060104@vmware.com> <6C0B27F7206C9E4CA54AE035729E9C38285358F7@szxeml509-mbs> <506AA530.30106@vmware.com> <6C0B27F7206C9E4CA54AE035729E9C382853645A@szxeml509-mbs> <507597E2.8090701@vmware.com> <5076DD38.8020804@vmware.com> <507BE1AD.2060709@vmware.com> <507C1D6C.6080409@vmware.com> <507D538C.80805@vmware.com> In-Reply-To: <507D538C.80805@vmware.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.3 (-------) X-Archive-Number: 201211/255 X-Sequence-Number: 216107 On 16.10.2012 15:31, Heikki Linnakangas wrote: > On 15.10.2012 19:31, Fujii Masao wrote: >> On Mon, Oct 15, 2012 at 11:27 PM, Heikki Linnakangas >> wrote: >>> On 15.10.2012 13:13, Heikki Linnakangas wrote: >>>> >>>> Oh, I didn't remember that we've documented the specific structs >>>> that we >>>> pass around. It's quite bogus anyway to explain the messages the way we >>>> do currently, as they are actually dependent on the underlying >>>> architecture's endianess and padding. I think we should refactor the >>>> protocol to not transmit raw structs, but use pq_sentint and friends to >>>> construct the messages. This was discussed earlier (see >>>> >>>> http://archives.postgresql.org/message-id/4FE2279C.2070506@enterprisedb.com), >>>> >>>> I think there's consensus that 9.3 would be a good time to do that >>>> as we changed the XLogRecPtr format anyway. >>> >>> This is what I came up with. The replication protocol is now >>> architecture-independent. The WAL format itself is still >>> architecture-independent, of course, but this is useful if you want >>> to e.g >>> use pg_receivexlog to back up a server that runs on a different >>> platform. >>> >>> I chose the int64 format to transmit timestamps, even when compiled with >>> --disable-integer-datetimes. >>> >>> Please review if you have the time.. >> >> Thanks for the patch! >> >> When I ran pg_receivexlog, I encountered the following error. > > Yeah, clearly I didn't test this near enough... > > I fixed the bugs you bumped into, new version attached. Committed this now, after fixing a few more bugs that came up during testing. Next, I'll take a look at the patch you sent for adding timeouts to pg_basebackup and pg_receivexlog (http://archives.postgresql.org/message-id/6C0B27F7206C9E4CA54AE035729E9C382853BBED@szxeml509-mbs) - Heikki