Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNhfd-0008Hb-SK; Mon, 15 Oct 2012 10:13:13 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNhfY-0007uE-4j; Mon, 15 Oct 2012 10:13:12 +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 0A209281A7; Mon, 15 Oct 2012 03:13:04 -0700 (PDT) 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 039B6B054B; Mon, 15 Oct 2012 03:13:04 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 621621219CE; Mon, 15 Oct 2012 03:12:09 -0700 (PDT) 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 PGCb8b_ToFGn; Mon, 15 Oct 2012 03:12:09 -0700 (PDT) Received: from [192.168.1.101] (unknown [10.113.62.14]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA id E20031219AC; Mon, 15 Oct 2012 03:12:07 -0700 (PDT) Message-ID: <507BE1AD.2060709@vmware.com> Date: Mon, 15 Oct 2012 13:13:01 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7 MIME-Version: 1.0 To: Fujii Masao CC: Amit Kapila , pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: BUG #7534: walreceiver takes long time to detect n/w breakdown References: <50515fcd.c32f320a.4297.ffffb186SMTPIN_ADDED@mx.google.com> <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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.3 (-------) X-Archive-Number: 201210/135 X-Sequence-Number: 34435 On 13.10.2012 19:35, Fujii Masao wrote: > On Thu, Oct 11, 2012 at 11:52 PM, Heikki Linnakangas > wrote: >> Ok, thanks. Committed. > > I found one typo. The attached patch fixes that typo. Thanks, fixed. > ISTM you need to update the protocol.sgml because you added > the field 'replyRequested' to WalSndrMessage and StandbyReplyMessage. 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. I'll look into doing that.. > Is it worth adding the same mechanism (send back the reply immediately > if walsender request a reply) into pg_basebackup and pg_receivexlog? Good catch. Yes, they should be taught about this too. I'll look into doing that too. - Heikki