From fbcbc5d06f53aea412130deb52e216aa3883fb8d Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 25 Jun 2005 22:47:29 +0000 Subject: Force a checkpoint before committing a CREATE DATABASE command. This should fix the recent reports of "index is not a btree" failures, as well as preventing a more obscure race condition involving changes to a template database just after copying it with CREATE DATABASE. --- doc/src/sgml/backup.sgml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index ba55eb634ae..01cdae83d69 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1,5 +1,5 @@ Backup and Restore @@ -1119,6 +1119,18 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows + + + If a CREATE DATABASE command is executed while a base + backup is being taken, and then the template database that the + CREATE DATABASE copied 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 TABLESPACE commands are WAL-logged with the literal -- cgit v1.2.3