From: | rob stone <floriparob(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, David Steele <david(at)pgmasters(dot)net> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Edson Carlos Ericksson Richter <richter(at)simkorp(dot)com(dot)br>, Martin Marques <martin(dot)marques(at)2ndquadrant(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Does PostgreSQL check database integrity at startup? |
Date: | 2017-12-26 22:11:56 |
Message-ID: | 1514326316.3143.16.camel@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
On Tue, 2017-12-26 at 18:58 -0300, Alvaro Herrera wrote:Hello,
> David Steele wrote:
>
> > pgBackRest will validate all page checksums (including indexes,
> > etc.) in the
> > cluster during backup. Full backups check everything,
> > incr/differential
> > backups check only the files that have changed.
>
> If a table or index file is of zero length when backed up, as in the
> described case, nothing will be checked, right? I mean, there is
> nothing externally indicating that the file ought to be of a
> different
> size. Am I wrong? So Edson's situation here would not raise any red
> flags.
>
Could the following occur:-
1) Your app. issues a BEGIN followed by an INSERT.
2) Postgres decides to open a new file in order to store the new row.
3) Your app. then does a ROLLBACK.
Wouldn't that leave you with a zero length file on disk?
There's no reason for Postgres to delete the file just because a
rollback was issued. All it has to do is clear the buffer in memory.
My 2 cents.
Rob
From | Date | Subject | |
---|---|---|---|
Next Message | Martin Marques | 2017-12-26 22:42:58 | Re: Does PostgreSQL check database integrity at startup? |
Previous Message | Alvaro Herrera | 2017-12-26 21:58:47 | Re: Does PostgreSQL check database integrity at startup? |