Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vpy8P-0003kV-MH for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Dec 2013 10:32:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vpy8O-0000JG-V7 for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Dec 2013 10:32:17 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vpy8N-0000J2-FU for pgsql-hackers@postgresql.org; Mon, 09 Dec 2013 10:32:15 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vpy79-0004SR-Lm for pgsql-hackers@postgresql.org; Mon, 09 Dec 2013 10:31:11 +0000 Received: from mfs6.rdh.ecl.ntt.co.jp (mfs6.rdh.ecl.ntt.co.jp [129.60.39.149]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id rB9AUjKK025720; Mon, 9 Dec 2013 19:30:45 +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 8C487E0148; Mon, 9 Dec 2013 19:30:45 +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 8003AE0146; Mon, 9 Dec 2013 19:30:45 +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 rB9AUjoD027710; Mon, 9 Dec 2013 19:30:45 +0900 Message-ID: <52A59D10.7020209@lab.ntt.co.jp> Date: Mon, 09 Dec 2013 19:36:00 +0900 From: KONDO Mitsumasa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: fabriziomello@gmail.com CC: Robert Haas , Simon Riggs , Pgsql Hackers Subject: Re: Time-Delayed Standbys References: 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 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. * Problem 1 I read your wittened document. There is "PITR has not affected". However, when I run PITR with min_standby_apply_delay=3000000, it cannot start server. The log is under following. > [mitsu-ko@localhost postgresql]$ bin/pg_ctl -D data2 start > server starting > [mitsu-ko@localhost postgresql]$ LOG: database system was interrupted; last known up at 2013-12-08 18:57:00 JST > LOG: creating missing WAL directory "pg_xlog/archive_status" > cp: cannot stat `../arc/00000002.history': > LOG: starting archive recovery > LOG: restored log file "000000010000000000000041" from archive > LOG: redo starts at 0/41000028 > LOG: consistent recovery state reached at 0/410000F0 > LOG: database system is ready to accept read only connections > LOG: restored log file "000000010000000000000042" from archive > FATAL: cannot wait on a latch owned by another process > LOG: startup process (PID 30501) exited with exit code 1 > LOG: terminating any other active server processes We need recovery flag for controling PITR situation. That's all for now. If you are busy, please fix in your pace. I'm busy and I'd like to wait your time, too:-) 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