pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marco Nenciarini <marco.nenciarini@2ndquadrant.it>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: francesco.canovai@2ndquadrant.it, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Magnus Hagander <magnus@hagander.net>
Subject: Re: [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby
Date: Fri, 8 Jul 2016 14:22:35 +0200
Message-ID: <9e092c86-5a8a-4732-cd5f-07a79c47b5f3@2ndquadrant.it> (raw)
In-Reply-To: <CAB7nPqTGtk=7ZC-XBjDEfbD5LRXTf8qdiQUJw9tbzpeKubhSzg@mail.gmail.com>
References: <20160706150739.1426.84965@wrigleys.postgresql.org>
	<de19a39a-7557-592a-9d12-5efd22e6d688@2ndquadrant.it>
	<f60355c1-d646-cb64-8081-fcfdba457512@2ndquadrant.it>
	<bdf05251-65d3-5847-671f-50a7cc3aa64b@2ndquadrant.it>
	<CAB7nPqT9v45=+Nixv=pcnOOWUQ2tE8TX77-TcKEZ56tvyt4s2A@mail.gmail.com>
	<d18fd50a-71a7-22f8-eb79-583e6b68a6f0@2ndquadrant.it>
	<CAB7nPqTGtk=7ZC-XBjDEfbD5LRXTf8qdiQUJw9tbzpeKubhSzg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 08/07/16 13:10, Michael Paquier wrote:
> On Fri, Jul 8, 2016 at 6:40 PM, Marco Nenciarini
> <marco.nenciarini@2ndquadrant.it> 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 Álvaro, 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.
> 
> 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.
> 

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

-- 
Marco Nenciarini - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it

Attachments:

  signature.asc (application/pgp-signature, 800B) download

view thread (15+ messages)  latest in thread

Message-ID: <9e092c86-5a8a-4732-cd5f-07a79c47b5f3@2ndquadrant.it>
Permalink:  ../9e092c86-5a8a-4732-cd5f-07a79c47b5f3@2ndquadrant.it/
Also on:    postgresql.org/message-id/9e092c86-5a8a-4732-cd5f-07a79c47b5f3@2ndquadrant.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: marco.nenciarini@2ndquadrant.it, michael.paquier@gmail.com, pgsql-hackers@postgresql.org, magnus@hagander.net
  Subject: Re: [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby
  In-Reply-To: <9e092c86-5a8a-4732-cd5f-07a79c47b5f3@2ndquadrant.it>
  References: <20160706150739.1426.84965@wrigleys.postgresql.org> <de19a39a-7557-592a-9d12-5efd22e6d688@2ndquadrant.it> <f60355c1-d646-cb64-8081-fcfdba457512@2ndquadrant.it> <bdf05251-65d3-5847-671f-50a7cc3aa64b@2ndquadrant.it> <CAB7nPqT9v45=+Nixv=pcnOOWUQ2tE8TX77-TcKEZ56tvyt4s2A@mail.gmail.com> <d18fd50a-71a7-22f8-eb79-583e6b68a6f0@2ndquadrant.it> <CAB7nPqTGtk=7ZC-XBjDEfbD5LRXTf8qdiQUJw9tbzpeKubhSzg@mail.gmail.com> <9e092c86-5a8a-4732-cd5f-07a79c47b5f3@2ndquadrant.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox