Re: Does PostgreSQL check database integrity at startup?

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Alban Hertroys <haramrae(at)gmail(dot)com>, Jan Wieck <jan(at)wi3ck(dot)info>, 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-30 16:19:24
Message-ID: CANu8Fiw=_EPkxXzTVktnY+pF+bXKN3RXv9BSi-1Wgo4bJtQDLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Dec 30, 2017 at 10:27 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:

> Greetings Alban,
>
> * Alban Hertroys (haramrae(at)gmail(dot)com) wrote:
> > In fact, I don't see it mentioned explicitly anywhere, but are we
> actually looking at a problem?
>
> From the discussion in the google barman group, it's clear that the file
> shouldn't be zero bytes in this specific case.
>
> > I'm not convinced by the argument that a CRC check of a 0 byte file on a
> standby would not detect corruption. At the least, the CRC would be
> different or we would be left with a CRC on the master that we can't match
> any CRC's on the slave to if the file is larger on the master.
>
> As discussed, files on the primary can be different at a byte level from
> those on replicas and still be perfectly valid and correct, for a
> variety of reasons from hint bit differences to differences due to the
> replica not being at exactly the same point as the primary.
>
> > If CRC's can be relied on to detect corruption (which they were designed
> to do), then that answers Edson's question.
>
> The checksums included in PG are page-level and therefore there simply
> isn't one to look at if the file is zero bytes.
>
> Thanks!
>
> Stephen
>

*Steve Atkins and Stephen Frost,You both remind me of gawkers at a
disaster, pointing out "mistakes" thatfirst responders are making, but
doing nothing yourselves to help.My query works as designed and has done so
for two years. It shows the filenames for schemas and tables in the
database. If you don't like it,TOO BAD! Shame on you! Use your brains and
write your own query. Nuff said, I shall reply no more. *
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message GPT 2017-12-30 19:17:34 Adding an extra boolean column to "information_schema.columns" or "pg_attribute"
Previous Message Stephen Frost 2017-12-30 15:27:16 Re: Does PostgreSQL check database integrity at startup?