Re: RFC: CRC datatype - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RFC: CRC datatype
Date
Msg-id 890.976294140@sss.pgh.pa.us
Whole thread Raw
In response to Re: RFC: CRC datatype  ("Horst Herb" <hherb@malleenet.net.au>)
List pgsql-hackers
"Horst Herb" <hherb@malleenet.net.au> writes:
> AFAIK the thread for "built in" crcs referred only to CRCs in the
> transaction log. This here is a different thing. CRCs in the transaction log
> are crucial to proof integrity of the log, CRCs as datatype are neccessary
> to proof integrity of database entries at row level.

I think a row-level CRC is rather pointless.  Perhaps it'd be a good
idea to have a disk-page-level CRC, though.  That would check the rows
on the page *and* allow catching errors in the page and tuple overhead
structures, which row-level CRCs would not cover.

I suspect TOAST breaks your notion of computing a CRC at trigger time
anyway --- some of the fields may be toasted already, some not.

If you're sufficiently paranoid that you insist you need a row-level
CRC, it seems to me that you'd want to generate it and later check it
in your application, not in the database.  That's the only way you get
end-to-end coverage.  Surely you don't trust your TCP connection to the
server, either?
        regards, tom lane


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: Indexing for geographic objects?
Next
From: "Horst Herb"
Date:
Subject: Re: RFC: CRC datatype