Aw: Re: pg_dump include/exclude data, was: verify checksums /CREATE DATABASE

Поиск
Список
Период
Сортировка
Искать
От
Karsten Hilbert
Тема
Aw: Re: pg_dump include/exclude data, was: verify checksums /CREATE DATABASE
Дата
Msg-id
trinity-09990bfd-ae66-4c01-b9bb-cafb31a57e9f-1560276934383@3c-app-gmx-bs19
Ответ на
Список
Дерево обсуждения
verify checksums / CREATE DATABASE Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: verify checksums / CREATE DATABASE Magnus Hagander <magnus@hagander.net>
pg_dump include/exclude data, was: verify checksums / CREATE DATABASE Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: pg_dump include/exclude data, was: verify checksums / CREATEDATABASE Adrian Klaver <adrian.klaver@aklaver.com>
Re: pg_dump include/exclude data, was: verify checksums / CREATEDATABASE Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: pg_dump include/exclude data, was: verify checksums / CREATEDATABASE Adrian Klaver <adrian.klaver@aklaver.com>
Aw: Re: pg_dump include/exclude data, was: verify checksums /CREATE DATABASE "Karsten Hilbert" <Karsten.Hilbert@gmx.net>
Re: Aw: Re: pg_dump include/exclude data, was: verify checksums /CREATE DATABASE Adrian Klaver <adrian.klaver@aklaver.com>
Re: pg_dump include/exclude data, was: verify checksums / CREATE DATABASE Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_dump include/exclude data, was: verify checksums / CREATEDATABASE Karsten Hilbert <Karsten.Hilbert@gmx.net>
> > The problem I hope to protect against with this approach: the
> > CREATE DATABASE might untaint corrupted data from a bad disk
> > block into a good disk block virtue of doing a file level
> > copy.
> >
> > I hope my reasoning isn't going astray.
>
> As I understand it checksums are done on the page level using a hash(for
> details: https://doxygen.postgresql.org/checksum__impl_8h_source.html).
> I am not sure how a page could get un-corrupted by virtue of a file copy.

Ah, no, I did not explain myself well.

Let's assume a corrupted, bad (but readable at the hardware
level) disk block B. A filesystem level copy (as in CREATE
DATABASE) would successfully read that disk block B and
copy the corrupted content into a good disk block G elsewhere
on the disk. Verifying the checksum of the page sitting on
block B before doing the database cloning would
reveal the corruption before it got cloned.

Does that make sense ?

Karsten


В списке pgsql-general по дате отправления
От: Igal Sapir
Дата:
От: Andreas Kretschmer
Дата:
FAQ