1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00
Files
postgres/doc/src/sgml/ref/checkpoint.sgml
Tom Lane 4d14fe0048 XLOG (and related) changes:
* Store two past checkpoint locations, not just one, in pg_control.
  On startup, we fall back to the older checkpoint if the newer one
  is unreadable.  Also, a physical copy of the newest checkpoint record
  is kept in pg_control for possible use in disaster recovery (ie,
  complete loss of pg_xlog).  Also add a version number for pg_control
  itself.  Remove archdir from pg_control; it ought to be a GUC
  parameter, not a special case (not that it's implemented yet anyway).

* Suppress successive checkpoint records when nothing has been entered
  in the WAL log since the last one.  This is not so much to avoid I/O
  as to make it actually useful to keep track of the last two
  checkpoints.  If the things are right next to each other then there's
  not a lot of redundancy gained...

* Change CRC scheme to a true 64-bit CRC, not a pair of 32-bit CRCs
  on alternate bytes.  Polynomial borrowed from ECMA DLT1 standard.

* Fix XLOG record length handling so that it will work at BLCKSZ = 32k.

* Change XID allocation to work more like OID allocation.  (This is of
  dubious necessity, but I think it's a good idea anyway.)

* Fix a number of minor bugs, such as off-by-one logic for XLOG file
  wraparound at the 4 gig mark.

* Add documentation and clean up some coding infelicities; move file
  format declarations out to include files where planned contrib
  utilities can get at them.

* Checkpoint will now occur every CHECKPOINT_SEGMENTS log segments or
  every CHECKPOINT_TIMEOUT seconds, whichever comes first.  It is also
  possible to force a checkpoint by sending SIGUSR1 to the postmaster
  (undocumented feature...)

* Defend against kill -9 postmaster by storing shmem block's key and ID
  in postmaster.pid lockfile, and checking at startup to ensure that no
  processes are still connected to old shmem block (if it still exists).

* Switch backends to accept SIGQUIT rather than SIGUSR1 for emergency
  stop, for symmetry with postmaster and xlog utilities.  Clean up signal
  handling in bootstrap.c so that xlog utilities launched by postmaster
  will react to signals better.

* Standalone bootstrap now grabs lockfile in target directory, as added
  insurance against running it in parallel with live postmaster.
2001-03-13 01:17:06 +00:00

68 lines
1.8 KiB
Plaintext

<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/checkpoint.sgml,v 1.4 2001/03/13 01:17:05 tgl Exp $ -->
<refentry id="sql-checkpoint">
<docinfo>
<date>2001-01-24</date>
</docinfo>
<refmeta>
<refentrytitle id="sql-checkpoint-title">CHECKPOINT</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>CHECKPOINT</refname>
<refpurpose>Force transaction log checkpoint</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
CHECKPOINT
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Write-Ahead Logging (WAL) puts a checkpoint in the transaction log
every so often. (To adjust the automatic checkpoint interval, see
the run-time
configuration options <parameter>CHECKPOINT_SEGMENTS</parameter>
and <parameter>CHECKPOINT_TIMEOUT</parameter>.)
The <command>CHECKPOINT</command> command forces an immediate checkpoint
when the command is issued, without waiting for a scheduled checkpoint.
</para>
<para>
A checkpoint is a point in the transaction log sequence at which
all data files have been updated to reflect the information in the
log. All data files will be flushed to disk. Refer to the
<citetitle>PostgreSQL Administrator's Guide</citetitle> for more
information about the WAL system.
</para>
<para>
Only superusers may call <command>CHECKPOINT</command>. The command is
not intended for use during normal operation.
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citetitle>PostgreSQL Administrator's Guide</citetitle>
</para>
</refsect1>
<refsect1>
<title>Compatibility</title>
<para>
The <command>CHECKPOINT</command> command is a
<productname>PostgreSQL</productname> language extension.
</para>
</refsect1>
</refentry>