Re: [HACKERS] [PATCHES] wal_checksum = on (default) | off

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "Jim Nasby" <decibel(at)decibel(dot)org>, "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>, <pgsql-hackers(at)postgresql(dot)org>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] [PATCHES] wal_checksum = on (default) | off
Date: 2007-01-11 16:18:36
Message-ID: 87r6u1wn8j.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
>> What did you think about protecting against torn writes using id numbers every
>> 512 bytes.
>
> Pretty much not happening; or are you volunteering to fix every part of
> the system to tolerate injections of inserted data anywhere in a stored
> datum?

I was thinking to do it at a low level as the xlog records are prepared to be
written to the filesystem and as the data is being read from disk. I haven't
read that code yet to see where to inject it but I understand there's already
a copy happening and it could be done there. Even if we optimize out all the
copies we could do it in the actual i/o call using readv/writev.

I wasn't thinking of doing it on actual disk buffers since it doesn't help us
avoid full page writes, but it could be done there too using readv/writev in
the smgr. That might be useful for a full_page_writes=off system so even if it
can't guarantee no corruption at least it can guarantee no silent corruption.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-01-11 16:22:19 Re: [HACKERS] [PATCHES] wal_checksum = on (default) | off
Previous Message Tom Lane 2007-01-11 16:00:53 Re: [COMMITTERS] pgsql: Stamp major release 8.3.0,

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-01-11 16:22:19 Re: [HACKERS] [PATCHES] wal_checksum = on (default) | off
Previous Message Tom Lane 2007-01-11 15:09:16 Re: wal buffers documentation -errata