pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: flumbador@virgilio.it
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Issue on restore / recover
Date: Fri, 19 Jan 2018 14:03:05 +0100 (CET)
Message-ID: <1355160593.1572577.1516366986038@mail.virgilio.it> (raw)
In-Reply-To: <20180112125206.gdwp3ulxc3pa6wdt@alvherre.pgsql>
References: <326066541.973171.1515753625461@mail.virgilio.it>
	<20180112125206.gdwp3ulxc3pa6wdt@alvherre.pgsql>

Hi

I agree with You!

The most important thing is that the backup is consistent and don't loose any files. However my opinion  is that postgresql should raise an error when it find a missing file during recovery, and not try to initialize it with empty pages ....

Thanks to all for the support

Best Regards

Gabriele 


Il 12 gennaio 2018 alle 13.52 Alvaro Herrera <alvherre@alvh.no-ip.org> ha scritto:

> 
>     flumbador@virgilio.it wrote:
> 
>         > > 
> >         I want to show that postgresql, while is recovering the database
> >         applying the WAL file, don't raise any error if it can't find a
> >         missing file. It continue the recovery that end successfully. I know
> >         that the source of the problem is that I have to guarantee that the
> >         backup is complete and consistent but it sound me strange that
> >         postgresql don't signal any errors when it can't find a file .... I
> >         hope that is clear the scope of the testcase.
> > 
> >     > 
>     It seems clear to me. Our current answer is that we just don't check
>     for this. It seems a very difficult situation to check for -- firstly
>     because, as you must have realized by now, the recovery process creates
>     some files that are missing when recovery starts, so just checking "do
>     all files exist" prior to starting recovery is not the right thing to
>     check for. Maybe you could figure out a check to run just at the point
>     where consistent point is reached, but (secondly) that would be a very
>     expensive way to check for a condition in the "should not happen" camp
>     (namely, that your backup tool is randomly losing files).
> 
>     Maybe one thing that is happening is that if you lose a whole file, and
>     later the recovery process fills page 2 with the correct tuples, then
>     page 0 and page 1 are initialized too to the empty state as a side effect.
>     If this is indeed what is happening, I have to say that it's not great.
>     But again, with a working backup system you wouldn't have lost the file
>     in the first place, so the case doesn't arise.
> 
>     --
>     Álvaro Herrera https://www.2ndQuadrant.com/
>     PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
> 

view thread (11+ messages)

Message-ID: <1355160593.1572577.1516366986038@mail.virgilio.it>
Permalink:  ../1355160593.1572577.1516366986038@mail.virgilio.it/
Also on:    postgresql.org/message-id/1355160593.1572577.1516366986038@mail.virgilio.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-admin@postgresql.org
  Cc: flumbador@virgilio.it, alvherre@alvh.no-ip.org
  Subject: Re: Issue on restore / recover
  In-Reply-To: <1355160593.1572577.1516366986038@mail.virgilio.it>
  References: <326066541.973171.1515753625461@mail.virgilio.it> <20180112125206.gdwp3ulxc3pa6wdt@alvherre.pgsql> <1355160593.1572577.1516366986038@mail.virgilio.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