Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLhRP-0003Nj-3g for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Jul 2016 01:52:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bLhRN-0008Ha-MY for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Jul 2016 01:52:21 +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 1bLhRM-0008FI-63 for pgsql-hackers@postgresql.org; Sat, 09 Jul 2016 01:52:20 +0000 Received: from mail-pa0-x22b.google.com ([2607:f8b0:400e:c03::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bLhRE-0006eC-0s for pgsql-hackers@postgresql.org; Sat, 09 Jul 2016 01:52:19 +0000 Received: by mail-pa0-x22b.google.com with SMTP id dx3so17079425pab.2 for ; Fri, 08 Jul 2016 18:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vquf3FbBxZehLOo+JD2HiYE6wWsnXirZkfjRVwyEZbc=; b=SrOvaMs2d9+qVhNiXHdKXxUerUdXt8aKvcAtrGpsAzd7QhN81fkL3tDYEvhlDdJhY9 NNdMF9gZ+8iwKxQBEp98KohrFXDNemrX22524cL8q+q5Ckb1w56tc7xCLj2nDRSg5vDB U0g6Yb3+AH8+b8bLAMlaG6iXDBO8qD/RA3Fkk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vquf3FbBxZehLOo+JD2HiYE6wWsnXirZkfjRVwyEZbc=; b=lXFjhF3aUDGqiZGiEdmr9u7a0E5FYj/Y10KS8agT+lJ0MRCxesYzEBoOSoqGZkEVP9 UBduqxpGOZg766zY88bGqhWpE/txHL6ajC7P7bzaaTEFJRoTkHYxyQCOFkRXOAf+eB6+ eibP26gwuQ3njP1qoMaxnjXYyxVQyO9zTm0fwpW0d1d3I5B1hD4aS/3eyFT3JfNLTEAL PgtNTI+Euq/ZKP+ClViJ9ln81MtaSZAZA2pR1AFq3nBU/yBIX+xPD8fDdmy2vat5bcfb nqGc1RtlQwQkIeMnT+8seVeY3mDUruXvfY7ObLpN+ZHtIKGkqJkT2tqshl4vlEA/Q8QP cUfg== X-Gm-Message-State: ALyK8tJkkSLM0C+6P6bC55nCG70VecvI3hA3zPPqRqQ2gAxdYVr+hh8oxfjLrEDE3Fh3kQ== X-Received: by 10.66.161.73 with SMTP id xq9mr14679009pab.6.1468029129020; Fri, 08 Jul 2016 18:52:09 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id o84sm7270601pfj.95.2016.07.08.18.52.07 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 08 Jul 2016 18:52:07 -0700 (PDT) Date: Fri, 8 Jul 2016 21:52:05 -0400 From: Noah Misch To: Magnus Hagander Cc: Marco Nenciarini , francesco.canovai@2ndquadrant.it, PostgreSQL mailing lists , PostgreSQL-development , Michael Paquier Subject: Re: [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby Message-ID: <20160709015205.GA1743635@tornado.leadboat.com> References: <20160706150739.1426.84965@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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 On Thu, Jul 07, 2016 at 03:38:26PM +0900, Michael Paquier wrote: > On Thu, Jul 7, 2016 at 12:57 AM, Marco Nenciarini > wrote: > > After further analysis, the issue is that we retrieve the starttli from > > the ControlFile structure, but it was using ThisTimeLineID when writing > > the backup label. > > > > I've attached a very simple patch that fixes it. > > ThisTimeLineID is always set at 0 on purpose on a standby, so we > cannot rely on it (well it is set temporarily when recycling old > segments). At recovery when parsing the backup_label file there is no > actual use of the start segment name, so that's only a cosmetic > change. But surely it would be better to get that fixed, because > that's useful for debugging. > > While looking at your patch, I thought that it would have been > tempting to use GetXLogReplayRecPtr() to get the timeline ID when in > recovery, but what we really want to know here is the timeline of the > last REDO pointer, which is starttli, and that's more consistent with > the fact that we use startpoint when writing the backup_label file. In > short, +1 for this fix. > > I am adding that in the list of open items, adding Magnus in CC whose > commit for non-exclusive backups is at the origin of this defect. [Action required within 72 hours. This is a generic notification.] The above-described topic is currently a PostgreSQL 9.6 open item. Magnus, since you committed the patch believed to have created it, you own this open item. If some other commit is more relevant or if this does not belong as a 9.6 open item, please let us know. Otherwise, please observe the policy on open item ownership[1] and send a status update within 72 hours of this message. Include a date for your subsequent status update. Testers may discover new open items at any time, and I want to plan to get them all fixed well in advance of shipping 9.6rc1. Consequently, I will appreciate your efforts toward speedy resolution. Thanks. [1] http://www.postgresql.org/message-id/20160527025039.GA447393@tornado.leadboat.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers