Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vr3di-0007lX-OB for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2013 10:37:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vr3di-0004Uz-2K for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2013 10:37:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vr3dc-0004Mv-P6 for pgsql-hackers@postgresql.org; Thu, 12 Dec 2013 10:37:00 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vr3dT-0000DO-LR for pgsql-hackers@postgresql.org; Thu, 12 Dec 2013 10:36:59 +0000 Received: from mfs6.rdh.ecl.ntt.co.jp (mfs6.rdh.ecl.ntt.co.jp [129.60.39.149]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id rBCAadZX008784; Thu, 12 Dec 2013 19:36:39 +0900 Received: from mfs6.rdh.ecl.ntt.co.jp (localhost.localdomain [127.0.0.1]) by mfs6.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 69560E013F; Thu, 12 Dec 2013 19:36:39 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by mfs6.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 5D648E013D; Thu, 12 Dec 2013 19:36:39 +0900 (JST) Received: from [129.60.241.67] ([129.60.241.67]) by imail3.m.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id rBCAad2g020543; Thu, 12 Dec 2013 19:36:39 +0900 Message-ID: <52A99310.6010301@lab.ntt.co.jp> Date: Thu, 12 Dec 2013 19:42:24 +0900 From: KONDO Mitsumasa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Simon Riggs CC: Pavel Stehule , =?UTF-8?B?RmFicsOtemlvIE1lbGw=?= =?UTF-8?B?bw==?= , Robert Haas , Pgsql Hackers Subject: Re: Time-Delayed Standbys References: <52A59D10.7020209@lab.ntt.co.jp> <52A5A17D.5010504@lab.ntt.co.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-MML: No X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org (2013/12/12 18:09), Simon Riggs wrote: > On 9 December 2013 10:54, KONDO Mitsumasa wrote: >> (2013/12/09 19:35), Pavel Stehule wrote: >>> >>> >>> >>> >>> 2013/12/9 KONDO Mitsumasa >> > >>> >>> >>> Hi Fabrízio, >>> >>> I test your v4 patch, and send your review comments. >>> >>> * Fix typo >>> > 49 -# commited transactions from the master, specify a recovery >>> time delay. >>> > 49 +# committed transactions from the master, specify a recovery >>> time delay. >>> >>> * Fix white space >>> > 177 - if (secs <= 0 && microsecs <=0) >>> > 177 + if (secs <= 0 && microsecs <=0 ) >>> >>> * Add functionality (I propose) >>> We can set negative number at min_standby_apply_delay. I think that >>> this feature >>> is for world wide replication situation. For example, master server is >>> in >>> Japan and slave server is in San Francisco. Japan time fowards than >>> San >>> Francisco time >>> . And if we want to delay in this situation, it can need negative >>> number in >>> min_standby_apply_delay. So I propose that time delay conditional >>> branch >>> change under following. >>> > - if (min_standby_apply_delay > 0) >>> > + if (min_standby_apply_delay != 0) >>> What do you think? It might also be working collectry. >>> >>> >>> what using interval instead absolute time? >> >> This is because local time is recorded in XLOG. And it has big cost for >> calculating global time. > > I agree with your request here, but I don't think negative values are > the right way to implement that, at least it would not be very usable. I think that my proposal is the easiest and simplist way to solve this problem. And I believe that the man who cannot calculate the difference in time-zone doesn't set replication cluster across continents. > My suggestion would be to add the TZ to the checkpoint record. This > way all users of WAL can see the TZ of the master and act accordingly. > I'll do a separate patch for that. It is something useful for also other situations. However, it might be going to happen long and complicated discussions... I think that our hope is to commit this patch in this commit-fest or next final commit-fest. Regards, -- Mitsumasa KONDO NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers