Re: Why we don't have checksums on clog files

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why we don't have checksums on clog files
Date: 2016-06-07 14:54:12
Message-ID: CAPpHfdvhyzN=uBfaBubaUiAqnTFDoUgsrSReCdD7Ovrq_oMPtA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 7, 2016 at 5:41 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:

> On Mon, Jun 6, 2016 at 8:43 PM, Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru>
> wrote:
>
>> Why we don't have checksums on clog files.
>>
>> We have checksum on pg_control, optional checksumming on data files, some
>> form of checksumming on wal's. But why we don't have any checksumming on
>> clogs. Corruptions on clogs lead to transaction visisbility problems and
>> database consistency violation.
>>
>> Can anybody explain this situation with clogs?
>>
>>
> I think it will be better if users can have an option to checksum clog
> pages. However, I think that will need a change in page (CLOG-page) format
> which might not be a trivial work to accomplish.
>

I think we should think no only about CLOG, but about all SLRU pages.
For data pages we have to reinitialize database cluster to enable
checksums. I think we can also require reinitialization to enable checksums
of SLRU pages. Thus, major problem would be that number of items fitting to
page would depend on whether checksums are enabled. However, it shouldn't
too hard.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-06-07 14:58:14 Re: Re: pg9.6 segfault using simple query (related to use fk for join estimates)
Previous Message Amit Kapila 2016-06-07 14:41:43 Re: Why we don't have checksums on clog files