| PostgreSQL Reference Manual - Volume 3 - Server Administration Guide by The PostgreSQL Global Development Group Paperback (6"x9"), 204 pages ISBN 0954612043 RRP £13.95 ($24.95) Sales of this book support the PostgreSQL project! Get a printed copy>>> |
10.3.5 Caveats
At this writing, there are several limitations of the continuous archiving technique. These will probably be fixed in future releases:
-
Operations on hash indexes are not presently WAL-logged, so
replay will not update these indexes. The recommended workaround
is to manually
REINDEXeach such index after completing a recovery operation. -
If a
CREATE DATABASEcommand is executed while a base backup is being taken, and then the template database that theCREATE DATABASEcopied is modified while the base backup is still in progress, it is possible that recovery will cause those modifications to be propagated into the created database as well. This is of course undesirable. To avoid this risk, it is best not to modify any template databases while taking a base backup. -
CREATE TABLESPACEcommands are WAL-logged with the literal absolute path, and will therefore be replayed as tablespace creations with the same absolute path. This might be undesirable if the log is being replayed on a different machine. It can be dangerous even if the log is being replayed on the same machine, but into a new data directory: the replay will still overwrite the contents of the original tablespace. To avoid potential gotchas of this sort, the best practice is to take a new base backup after creating or dropping tablespaces.
It should also be noted that the default WAL
format is fairly bulky since it includes many disk page snapshots.
These page snapshots are designed to support crash recovery, since
we may need to fix partially-written disk pages. Depending on
your system hardware and software, the risk of partial writes may
be small enough to ignore, in which case you can significantly
reduce the total volume of archived logs by turning off page
snapshots using the full_page_writes
parameter. (Read the notes and warnings in section 14 Reliability and the Write-Ahead Log
before you do so.) Turning off page snapshots does not prevent
use of the logs for PITR operations. An area for future
development is to compress archived WAL data by removing
unnecessary page copies even when full_page_writes is
on. In the meantime, administrators may wish to reduce the number
of page snapshots included in WAL by increasing the checkpoint
interval parameters as much as feasible.
| ISBN 0954612043 | PostgreSQL Reference Manual - Volume 3 - Server Administration Guide | See the print edition |