From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Edson Carlos Ericksson Richter <richter(at)simkorp(dot)com(dot)br>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Does PostgreSQL check database integrity at startup? |
Date: | 2017-12-27 21:52:04 |
Message-ID: | 20171227215204.nucxo7b2ssmyznip@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
For context: this was first reported in the Barman forum here:
https://groups.google.com/forum/#!msg/pgbarman/3aXWpaKWRFI/weUIZxspDAAJ
They are using Barman for the backups.
Stephen Frost wrote:
> > But at some point in time, slave became corrupt (one of the base
> > files are zero size where it should be 16Mb in size), and IMHO a
> > "red alert" should arise - Slave server shall not even startup at
> > all.
>
> How do you know it should be 16Mb in size...? That sounds like you're
> describing a WAL file, but you should be archiving your WAL files during
> a backup, not just using whatever is in pg_xlog/pg_wal..
It's not a WAL file -- it's a file backing a table.
> > Since backups are taken from slave server, all backups are also corrupt.
>
> If you aren't following the appropriate process to perform a backup
> then, yes, you're going to end up with corrupt and useless/bad backups.
A few guys went over the backup-taking protocol upthread already.
But anyway the backup tool is a moot point. The problem doesn't
originate in the backup -- it originates in the standby, from where the
backup is taken. The file can be seen as size 0 in the standby.
Edson's question is: why wasn't the problem detected in the standby?
It seems a valid question to me, to which we currently we don't have any
good answer.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2017-12-27 23:03:31 | Re: Does PostgreSQL check database integrity at startup? |
Previous Message | Stephen Frost | 2017-12-27 21:33:15 | Re: Does PostgreSQL check database integrity at startup? |