Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLUnx-0002Yn-Kb for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Jul 2016 12:22:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bLUnx-000126-47 for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Jul 2016 12:22:49 +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_2) (envelope-from ) id 1bLUnv-0000z4-9N for pgsql-hackers@postgresql.org; Fri, 08 Jul 2016 12:22:47 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bLUnq-000696-OZ for pgsql-hackers@postgresql.org; Fri, 08 Jul 2016 12:22:46 +0000 Received: by mail-wm0-x22b.google.com with SMTP id k123so11885323wme.0 for ; Fri, 08 Jul 2016 05:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant.it; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=LA6M/UVb0DmZKGiKL0YCwK+pBvkHKS6lSSYo+fjsHnM=; b=TR7roFlsNK6wCjalHYAXEASqep5qyJ1bni9bGrVfuR52SotXTX55LJIwP539FFtShP d5x+q83NJR5EQ54LfuWSSYwPPFwixLAn6tIyh3sfFink5KyHBUiJLvpp4ZgPtcDuO0Qt 5LV0VaZWmDTtya3dRzj9UmpIb6AWzpmZwX3Nc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=LA6M/UVb0DmZKGiKL0YCwK+pBvkHKS6lSSYo+fjsHnM=; b=LMwLyKMTBjfat2xCoRszJM02WONlgxVfKLD0Q55IniqN8ORb+dyBbEfVf1SiIR8caN KHyQkuO39zpAgZO8ZVN6oQMAKkSEdPyOe+DSXY9odFzs5fPYcLEOHqBPqV3kXtAidAR6 8l2otSaqVrMe1oAFaE2k+DRvVBTSpexzS3CfoZ6SnYRVtOM3gRjTmAtRNU5M6ZQUVnYS kjrOoxFTDTVsO9hXdRkPQwK1Qm+UNVlHmlZZFeeHtDFS2pSwX6i8+GgW9TALPoFP5FRQ gvXuPWXzcD6ObKzh3W15kirdx51jcaRuf3S+mUoTdPGt7HkriDWmvrrTfrw380DrxqX1 u09A== X-Gm-Message-State: ALyK8tK7vNZyFYayRl75ItTeUM+u3D/Dx6j6Dkr4XLgNsMd9HG2lT85H1v9YmZIhLtyRRAoj X-Received: by 10.194.100.229 with SMTP id fb5mr5853222wjb.36.1467980561093; Fri, 08 Jul 2016 05:22:41 -0700 (PDT) Received: from titanium.local (net-37-182-231-222.cust.vodafonedsl.it. [37.182.231.222]) by smtp.googlemail.com with ESMTPSA id d192sm2785909wmd.14.2016.07.08.05.22.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jul 2016 05:22:40 -0700 (PDT) Subject: Re: [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby To: Michael Paquier References: <20160706150739.1426.84965@wrigleys.postgresql.org> Cc: francesco.canovai@2ndquadrant.it, PostgreSQL mailing lists , PostgreSQL-development , Magnus Hagander From: Marco Nenciarini Message-ID: <9e092c86-5a8a-4732-cd5f-07a79c47b5f3@2ndquadrant.it> Date: Fri, 8 Jul 2016 14:22:35 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IbvHOLqEFJO6oELncBw6dqRWtKSic5rsK" X-Pg-Spam-Score: -2.7 (--) 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 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IbvHOLqEFJO6oELncBw6dqRWtKSic5rsK From: Marco Nenciarini To: Michael Paquier Cc: francesco.canovai@2ndquadrant.it, PostgreSQL mailing lists , PostgreSQL-development , Magnus Hagander Message-ID: <9e092c86-5a8a-4732-cd5f-07a79c47b5f3@2ndquadrant.it> Subject: Re: [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby References: <20160706150739.1426.84965@wrigleys.postgresql.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/07/16 13:10, Michael Paquier wrote: > On Fri, Jul 8, 2016 at 6:40 PM, Marco Nenciarini > wrote: >> The resulting backup is working perfectly, because Postgres has no use >> for pg_stop_backup LSN, but this can confuse any tool that uses the stop >> LSN to figure out which WAL files are needed by the backup (in this case >> the only file needed is the one containing the start checkpoint). >> >> After some discussion with =C3=81lvaro, my proposal is to avoid that by >> returning the stoppoint as the maximum between the startpoint and the >> min_recovery_end_location, in case of backup from the standby. >=20 > You are facing a pattern similar to the problem reported already on > this thread by Horiguchi-san: > http://www.postgresql.org/message-id/20160609.215558.118976703.horiguchi.= kyotaro@lab.ntt.co.jp > And it seems to me that you are jumping to an incorrect conclusion, > what we'd want to do is to update a bit more aggressively the minimum > recovery point in cases on a node in recovery in the case where no > buffers are flushed by other backends. >=20 Yes, it is exactly the same bug. My proposal was based on the assumption that it were only a cosmetic issue, but given that it can trigger errors, I agree that the right solution is to advance the minimum recovery point in that case. Regards, Marco --=20 Marco Nenciarini - 2ndQuadrant Italy PostgreSQL Training, Services and Support marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it --IbvHOLqEFJO6oELncBw6dqRWtKSic5rsK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJXf5sPAAoJEFifA/AbpVA4VPoP/AkOodOgKNJ94Vv2Z45GAP+J P4ObngIWXLk2oDfYwSXUisUH8xmbwHp8y1ZM1Jw0MwzFYEXTClDWHAiiZ8Jv3ifQ AiUm49Io825O1Qk3FBcH71r2DsPn5M+nXUxqSgBV5StrXVa+F3EiNdW9EugGJ7mn bynPiX36JtJmLx7LAlgMg/uPayY7dnGlyv10A3NJTl3eE7U8xBD64ANVl7AIqz49 OUArHbUHKTptiquo6dxvAmxAl6rdHHHo3TXeeGwRuvpXTMZ3OsBSWjBs7zV611KD fDv5CLOHxax0P9Ng/ESqm9/JBV3dFyt/VuyjRiJYxYtKIk3HbXoP//fM4aYOnT8V kxekWSK9VV2VoLWAtYYx24VV9Rx+O50aoicY83iqVx+340zlKIBcXCDGM7I4HJA2 QOE+nH0pIZrJpp2WulE1Hu70S+sWlzpMxfLfzCsyUg62rnIHnQfDuvmMOB5jK9HT oMsZmVpg1YcZvKNJw0S68riZmI/GgclSrNSbZyrqMS+08LxXeWTjkdBpFpCIuW0E Tzp08/ni4YO3YdrfG2tURM1rQcjXbirQyobffaiJiiCHx8Dk38ft+ITrxHI5h1Ls FnJoVpjPFuQdVUON968iAPhApXSI4/QLNUuGNuXspNGwr5iEha8NYyU5DfMaIijt WHQAcWeMpFkh89qzJSBp =+5Xv -----END PGP SIGNATURE----- --IbvHOLqEFJO6oELncBw6dqRWtKSic5rsK--