blob: 28e0756d61304f1b1a888a032f4b7281c8408e41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>30.2. Data Checksums</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="wal-reliability.html" title="30.1. Reliability" /><link rel="next" href="wal-intro.html" title="30.3. Write-Ahead Logging (WAL)" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">30.2. Data Checksums</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="wal-reliability.html" title="30.1. Reliability">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="wal.html" title="Chapter 30. Reliability and the Write-Ahead Log">Up</a></td><th width="60%" align="center">Chapter 30. Reliability and the Write-Ahead Log</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="wal-intro.html" title="30.3. Write-Ahead Logging (WAL)">Next</a></td></tr></table><hr /></div><div class="sect1" id="CHECKSUMS"><div class="titlepage"><div><div><h2 class="title" style="clear: both">30.2. Data Checksums <a href="#CHECKSUMS" class="id_link">#</a></h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="checksums.html#CHECKSUMS-OFFLINE-ENABLE-DISABLE">30.2.1. Off-line Enabling of Checksums</a></span></dt></dl></div><a id="id-1.6.17.4.2" class="indexterm"></a><p>
By default, data pages are not protected by checksums, but this can
optionally be enabled for a cluster. When enabled, each data page includes
a checksum that is updated when the page is written and verified each time
the page is read. Only data pages are protected by checksums; internal data
structures and temporary files are not.
</p><p>
Checksums are normally enabled when the cluster is initialized using <a class="link" href="app-initdb.html#APP-INITDB-DATA-CHECKSUMS"><span class="application">initdb</span></a>.
They can also be enabled or disabled at a later time as an offline
operation. Data checksums are enabled or disabled at the full cluster
level, and cannot be specified individually for databases or tables.
</p><p>
The current state of checksums in the cluster can be verified by viewing the
value of the read-only configuration variable <a class="xref" href="runtime-config-preset.html#GUC-DATA-CHECKSUMS">data_checksums</a> by issuing the command <code class="command">SHOW
data_checksums</code>.
</p><p>
When attempting to recover from page corruptions, it may be necessary to
bypass the checksum protection. To do this, temporarily set the
configuration parameter <a class="xref" href="runtime-config-developer.html#GUC-IGNORE-CHECKSUM-FAILURE">ignore_checksum_failure</a>.
</p><div class="sect2" id="CHECKSUMS-OFFLINE-ENABLE-DISABLE"><div class="titlepage"><div><div><h3 class="title">30.2.1. Off-line Enabling of Checksums <a href="#CHECKSUMS-OFFLINE-ENABLE-DISABLE" class="id_link">#</a></h3></div></div></div><p>
The <a class="link" href="app-pgchecksums.html" title="pg_checksums"><span class="application">pg_checksums</span></a>
application can be used to enable or disable data checksums, as well as
verify checksums, on an offline cluster.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="wal-reliability.html" title="30.1. Reliability">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="wal.html" title="Chapter 30. Reliability and the Write-Ahead Log">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="wal-intro.html" title="30.3. Write-Ahead Logging (WAL)">Next</a></td></tr><tr><td width="40%" align="left" valign="top">30.1. Reliability </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 30.3. Write-Ahead Logging (<acronym class="acronym">WAL</acronym>)</td></tr></table></div></body></html>
|