Re: pg_checksums (or checksums in general) vs tableam

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org,Magnus Hagander <magnus(at)hagander(dot)net>,Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_checksums (or checksums in general) vs tableam
Date: 2019-07-10 16:19:03
Message-ID: A753EE01-C817-4BDA-82EF-D9C9A7221A35@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On July 10, 2019 9:12:18 AM PDT, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>On Wed, Jul 10, 2019 at 3:05 PM Michael Paquier <michael(at)paquier(dot)xyz>
>wrote:
>
>> On Wed, Jul 10, 2019 at 11:42:34AM +0200, Magnus Hagander wrote:
>> > pg_checksums enumerate the files. What if there are files there
>from a
>> > different tableam? Isn't pg_checksums just going to badly fail
>then,
>> since
>> > it assumes everything is heap?
>> >
>> > Also, do we allow AMs that don't support checksumming data? Do we
>have
>> any
>> > checks for tables created with such AMs in a system that has
>checksums
>> > enabled?
>>
>> Table AMs going through shared buffers and smgr.c, like zedstore,
>> share the same page header, meaning that the on-disk file is the same
>> as heap, and that checksums are compiled similarly to heap.
>> pg_checksums is not going to complain on those ones and would work
>> just fine.
>
>
>> Table AMs using their own storage layer (which would most likely use
>> their own checksum method normally?) would be ignored by pg_checksums
>> if the file names don't match what smgr uses, but it could result in
>> failures if they use on-disk file names which match.
>>
>
>That would be fine, if we actually knew. Should we (or have we
>already?)
>defined a rule that they are not allowed to use the same naming
>standard
>unless they have the same type of header?

No, don't think we have already. There's the related problem of what to include in base backups, too.

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2019-07-10 16:26:24 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)
Previous Message Magnus Hagander 2019-07-10 16:12:18 Re: pg_checksums (or checksums in general) vs tableam