mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Add code to apply some simple sanity checks to the header fields of a
page when it's read in, per pghackers discussion around 17-Feb. Add a GUC variable zero_damaged_pages that causes the response to be a WARNING followed by zeroing the page, rather than the normal ERROR; this is per Hiroshi's suggestion that there needs to be a way to get at the data in the rest of the table.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.174 2003/03/25 16:15:38 petere Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.175 2003/03/28 20:17:13 tgl Exp $
|
||||
-->
|
||||
|
||||
<Chapter Id="runtime">
|
||||
@ -1599,7 +1599,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
||||
|
||||
<para>
|
||||
It should be noted that the performance penalty of having
|
||||
<varname>fsync</> on considerably less in
|
||||
<varname>fsync</> on is considerably less in
|
||||
<productname>PostgreSQL</> version 7.1 and later. If you
|
||||
previously suppressed <function>fsync</> for performance
|
||||
reasons, you may wish to reconsider your choice.
|
||||
@ -2174,6 +2174,24 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>ZERO_DAMAGED_PAGES</varname> (<type>boolean</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Detection of a damaged page header normally causes
|
||||
<productname>PostgreSQL</> to report an error, aborting the current
|
||||
transaction. Setting <varname>zero_damaged_pages</> to true causes
|
||||
the system to instead report a warning, zero out the damaged page,
|
||||
and continue processing. This behavior <emphasis>will lose data</>,
|
||||
namely all the rows on the damaged page. But it allows you to get
|
||||
past the error and retrieve rows from any undamaged pages that may
|
||||
be present in the table. So it is useful for recovering data if
|
||||
corruption has occurred due to hardware or software error. The
|
||||
default setting is off, and it can only be changed by a superuser.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</sect2>
|
||||
|
||||
|
Reference in New Issue
Block a user