Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a7Zgy-0000wF-3F for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Dec 2015 02:13:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a7Zgw-0002q2-IC for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Dec 2015 02:13:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a7Zgu-0002pf-Q4 for pgsql-bugs@postgresql.org; Sat, 12 Dec 2015 02:13:44 +0000 Received: from mout.gmx.net ([212.227.15.18]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84) (envelope-from ) id 1a7Zgr-0005kd-LD for pgsql-bugs@postgresql.org; Sat, 12 Dec 2015 02:13:44 +0000 Received: from auth1-smtp.messagingengine.com ([66.111.4.227]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MEFlg-1a12Fe2MC8-00FSot for ; Sat, 12 Dec 2015 03:13:38 +0100 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 3CC4020E8F for ; Fri, 11 Dec 2015 21:13:37 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Fri, 11 Dec 2015 21:13:37 -0500 X-Sasl-enc: KiKDtb5KVQHdLeIUIEymaUwnctrphrSSKtotnRNk3Klz 1449886417 Received: from [10.0.0.7] (c-73-13-69-21.hsd1.pa.comcast.net [73.13.69.21]) by mail.messagingengine.com (Postfix) with ESMTPA id D78D968009F; Fri, 11 Dec 2015 21:13:36 -0500 (EST) Subject: Re: pg_rewind exiting with error code 1 when source and target are on the same timeline To: Michael Paquier References: <5627E2A4.4000402@gmx.net> <566106F7.4000404@gmx.net> Cc: PostgreSQL mailing lists , Heikki Linnakangas From: Peter Eisentraut X-Enigmail-Draft-Status: N1110 Message-ID: <566B82CF.6070809@gmx.net> Date: Fri, 11 Dec 2015 21:13:35 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:h6MHPWZo2LNT1vFrxLz3e7gQxXxp2prFeO3LfbfdCdBuTzFF30C B+N59g9QFvSacXj7FGCQUYXhgEVTIzDNDgTshP9OUMtcOWwl38v49V6WLT40MZ/wRbKgvLZ EmzN7xYy+fc0ItSNpVlj40EMpu0jocLhmd4asHr8otI3C9aWS1w3ax1AZxotviw5CKNKkKC i2iyGb7eLMjof99TDPwUQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:eTguZw1CqnA=:FdbHY9trZYapBXAfS9/lsh 2HX5QF7XCETesUEVvsyxrCy0q7FdBUjQYEenxdprNT/0wNqB9GUutLckow8FAlJWfvMnK8w3J wXpvvl5WYH1mBcUQv4HEQi1dn4MdEvoRcKUWeTiCdPKaSEM+GY2eVU57EmyYlh5u0Bz9WcdUT xFEZjkrDvIHkfZSyN7D2GBwNYRvxOLDZGzLCUxYx6y+007gGa5D8c2NrFfxemyCaPbwRvPSY+ KwbkxMk5mlHI3AOGT2cFdwM0hd7j+hHJx2qKfatYEUhtzxqk/FbuLEv2A29xQ6RdJ1g4V+8uy MzfW1sFPHQAl/AcHjKjUg/i6cyoHVF0C9VF6mTPK5XMavavfoIQ1HNecJLNrSA0P6np5xfNRJ PbMFmKc709UFln72caqzrk0DYfJXm7SrJd6pNXf3g8MdozuEq47LHHWk1vpnlxQOLXGdSHahV zV0Qv9AK5ITsGZ3Si9EyJMVUUlt3zbyGnmyVcqY+UJSHmIy1qyVN9bKYyuEiBu8jJu85j22pw vULy3ooOejparGzgSSke3T+c/FOWawgaJJEBdn8X7kkWaf34YsrgeeJ0rZ+8tfgPuSxBX1QJe LoZvKiike/lio/1jmflBUmaokU6kQWYHsHrib/tCeTMDVBcNT4N5x3mNmqBq3eYG5fbGhGcBu Z8rO7mW+RJqSe2Kcr0QlWNUY9j6FOhGKH7pg8UCkdV/21jbGGY9Z5S71bTUlJLkFD+TuOEfJd dE8vQrNoOuBcZlptDoeqAKwNYdulrieMQ14zoRkXcK8AaCfK+g9xpehoLwkwwIb55VHfjVPZ1 DxVHaqA X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 12/3/15 11:10 PM, Michael Paquier wrote: > On Fri, Dec 4, 2015 at 12:22 PM, Peter Eisentraut wrote: >> On 10/22/15 1:42 AM, Michael Paquier wrote: >>> I am not sure that I am not getting completely your point, why would >>> it be a win to remove this safety check? We surely do not want to look >>> for the common ancestor timeline if the target and source nodes have >>> the same timeline, so we should not remove this check and just set >>> rewind_needed to false to fallback to the same exit(0) for all those >>> code paths. Per se the attached for example. >> >> After playing with this a bit, I think your patch is correct. The code >> has drifted a bit in the meantime, so attached is an updated patch. > > Thanks for looking at it. I committed this to master. It's also on the 9.5 open item list, but if I backport it then the tests don't pass. Still looking. Not sure yet if this is because of code changes in pg_rewind master or test infrastructure changes in master. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs