postgresql/src
Andres Freund 7dbb606938 Flush unlogged table's buffers when copying or moving databases.
CREATE DATABASE and ALTER DATABASE .. SET TABLESPACE copy the source
database directory on the filesystem level. To ensure the on disk
state is consistent they block out users of the affected database and
force a checkpoint to flush out all data to disk. Unfortunately, up to
now, that checkpoint didn't flush out dirty buffers from unlogged
relations.

That bug means there could be leftover dirty buffers in either the
template database, or the database in its old location. Leading to
problems when accessing relations in an inconsistent state; and to
possible problems during shutdown in the SET TABLESPACE case because
buffers belonging files that don't exist anymore are flushed.

This was reported in bug #10675 by Maxim Boguk.

Fix by Pavan Deolasee, modified somewhat by me. Reviewed by MauMau and
Fujii Masao.

Backpatch to 9.1 where unlogged tables were introduced.
2014-10-20 23:43:46 +02:00
..
backend Flush unlogged table's buffers when copying or moving databases. 2014-10-20 23:43:46 +02:00
bin Fix typos. 2014-10-20 10:33:16 -04:00
common Small message fixes 2014-08-09 00:07:00 -04:00
include Flush unlogged table's buffers when copying or moving databases. 2014-10-20 23:43:46 +02:00
interfaces Fix typos. 2014-10-20 10:33:16 -04:00
makefiles Add file version information to most installed Windows binaries. 2014-07-14 14:07:52 -04:00
pl Translation updates 2014-10-05 23:23:50 -04:00
port Suppress dead, unportable src/port/crypt.c code. 2014-10-12 23:27:06 -04:00
template Remove Alpha and Tru64 support. 2014-06-28 21:46:15 +02:00
test Fix mishandling of FieldSelect-on-whole-row-Var in nested lateral queries. 2014-10-20 12:23:42 -04:00
timezone Support timezone abbreviations that sometimes change. 2014-10-16 15:22:10 -04:00
tools Add valgrind suppression for padding bytes in twophase records. 2014-09-01 15:59:44 +02:00
tutorial Adjust blank lines around PG_MODULE_MAGIC defines, for consistency 2014-07-10 14:02:08 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Fix quoting in the add_to_path Makefile macro. 2014-10-12 23:33:37 -04:00
Makefile.shlib Remove Alpha and Tru64 support. 2014-06-28 21:46:15 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00