postgresql/src/include/access
Andres Freund d5fef87e96 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:47:45 +02:00
..
attnum.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
clog.h Fix timing of Startup CLOG and MultiXact during Hot Standby 2011-11-02 08:06:54 +00:00
genam.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
gin.h pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
gin_private.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
gist.h Document and clean up gistsplit.c. 2013-02-10 11:58:28 -05:00
gist_private.h Avoid palloc in critical section in GiST WAL-logging. 2014-04-03 15:44:20 +03:00
gistscan.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
hash.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
heapam.h Implement genuine serializable isolation level. 2011-02-08 00:09:08 +02:00
hio.h pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
htup.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
itup.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
multixact.h Fix incomplete backpatch of pg_multixact truncation changes to <= 9.2 2013-12-02 13:28:18 -03:00
nbtree.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
printtup.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
reloptions.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
relscan.h Move the PredicateLockRelation() call from nodeSeqscan.c to heapam.c. It's 2011-06-29 22:10:45 +03:00
rewriteheap.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
rmgr.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
sdir.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
skey.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
slru.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
subtrans.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
sysattr.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
transam.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
tupconvert.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
tupdesc.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
tupmacs.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
tuptoaster.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
twophase.h Fix race condition in preparing a transaction for two-phase commit. 2014-05-15 17:03:08 +03:00
twophase_rmgr.h Renumber 2PC resource managers so that compared to 9.0, predicate lock rmgr 2011-06-14 12:36:51 +03:00
valid.h Pass collations to functions in FunctionCallInfoData, not FmgrInfo. 2011-04-12 19:19:24 -04:00
visibilitymap.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
xact.h Treat 2PC commit/abort the same as regular xacts in recovery. 2014-07-29 11:58:09 +03:00
xlog.h Flush unlogged table's buffers when copying or moving databases. 2014-10-20 23:47:45 +02:00
xlog_internal.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
xlogdefs.h Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
xlogutils.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00