Re: Block-level CRC checks - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Block-level CRC checks
Date
Msg-id 87tzauay5e.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Block-level CRC checks  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Block-level CRC checks
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:

> Ah, actually there's another alternative -- leave the checksum on its
> current position (start of struct) and move other members below
> pg_pagesize_version (leaning towards pd_tli and pd_flags).  That'd leave
> the page version in the same position.

I don't understand why the position of anything matters here. Look at TCP
packets for instance, the checksum is not at the beginning or end of anything.

The CRC is chosen such that if you CRC the resulting packet including the CRC
you get a CRC of 0. That can be done for whatever offset the CRC appears at I
believe.


--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!


pgsql-hackers by date:

Previous
From: Markus Wanner
Date:
Subject: Re: Postgres-R pacth
Next
From: Zdenek Kotala
Date:
Subject: Re: Block-level CRC checks