diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-03-29 00:15:39 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-03-29 00:15:39 +0000 |
commit | fba8113c1b74b9508cf2e6b7a18b0fb3637d9ba0 (patch) | |
tree | b70081c09aa6f06b442f4f43313e738a693de7ea /src/backend/executor/execMain.c | |
parent | 4591fb1aa8c0f8c2d724c2a83e1a336650cca933 (diff) | |
download | postgresql-fba8113c1b74b9508cf2e6b7a18b0fb3637d9ba0.tar.gz postgresql-fba8113c1b74b9508cf2e6b7a18b0fb3637d9ba0.zip |
Teach CLUSTER to skip writing WAL if not needed (ie, not using archiving)
--- Simon.
Also, code review and cleanup for the previous COPY-no-WAL patches --- Tom.
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r-- | src/backend/executor/execMain.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index b2f7159e8c0..cacd7c6fe70 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -26,7 +26,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.291 2007/03/25 19:45:14 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.292 2007/03/29 00:15:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -2541,14 +2541,8 @@ CloseIntoRel(QueryDesc *queryDesc) /* OpenIntoRel might never have gotten called */ if (estate->es_into_relation_descriptor) { - /* - * If we skipped using WAL, and it's not a temp relation, we must - * force the relation down to disk before it's safe to commit the - * transaction. This requires forcing out any dirty buffers and then - * doing a forced fsync. - */ - if (!estate->es_into_relation_use_wal && - !estate->es_into_relation_descriptor->rd_istemp) + /* If we skipped using WAL, must heap_sync before commit */ + if (!estate->es_into_relation_use_wal) heap_sync(estate->es_into_relation_descriptor); /* close rel, but keep lock until commit */ |