heap page corruption not easy

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: heap page corruption not easy
Date: 2000-12-18 10:00:00
Message-ID: 11C1E6749A55D411A9670001FA687963368188@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


A heap page corruption is not very likely in PostgreSQL because of the
underlying page design. Not even on flakey hardware/ossoftware.
(I once read a page design note from pg 4 but don't exactly remember
were or when)

The point is, that the heap page is only modified in places that were
previously empty (except header). All previous row data stays exactly
in the same place. Thus if a page is only partly written
(any order of page segments) only a new row is affected. But those rows
will be fixed during redo anyway. The only source of serious problems is
thus a bogus write of a page segment (100 bytes ok 412 bytes chunk
actually written to disk), but this case is imho sufficiently guarded or at least
detected by disk hardware.
(I assume that the page header fits into one atomic block and has no problem
with beeing one step behind or ahead of redo).

I thus doubt that we really need "physical log" for heap pages in PostgreSQL
with the current non-overwrite smgr. If we could detect corruption in index pages
we would not need physical log at all, since an index can always be recreated.

What do you think ? I ask because "physical log" is a substantial amount of
additional IO that we imho only want if it is absolutely necessary.

Andreas

PS: reposted, did this not make it to the list ?

Browse pgsql-hackers by date

  From Date Subject
Next Message Steve Howe 2000-12-18 12:43:51 OID Implicit limit
Previous Message Luis Sousa 2000-12-18 09:16:42 Re: Ocasional problems !!!!