mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Avoid WAL-logging individual tuple insertions during CREATE TABLE AS
(a/k/a SELECT INTO). Instead, flush and fsync the whole relation before committing. We do still need the WAL log when PITR is active, however. Simon Riggs and Tom Lane.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/smgr/md.c,v 1.115 2005/05/29 04:23:05 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/smgr/md.c,v 1.116 2005/06/20 18:37:01 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -660,6 +660,9 @@ mdtruncate(SMgrRelation reln, BlockNumber nblocks, bool isTemp)
|
||||
|
||||
/*
|
||||
* mdimmedsync() -- Immediately sync a relation to stable storage.
|
||||
*
|
||||
* Note that only writes already issued are synced; this routine knows
|
||||
* nothing of dirty buffers that may exist inside the buffer manager.
|
||||
*/
|
||||
bool
|
||||
mdimmedsync(SMgrRelation reln)
|
||||
|
||||
Reference in New Issue
Block a user