Avoid WAL-logging individual tuple insertions during CREATE TABLE AS
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/heapam.c | modified | +24 −12 |
| src/backend/access/heap/hio.c | modified | +24 −3 |
| src/backend/executor/execMain.c | modified | +38 −3 |
| src/backend/executor/execUtils.c | modified | +3 −1 |
| src/backend/storage/smgr/md.c | modified | +4 −1 |
| src/backend/storage/smgr/smgr.c | modified | +7 −2 |
| src/include/access/heapam.h | modified | +3 −2 |
| src/include/access/hio.h | modified | +2 −2 |
| src/include/nodes/execnodes.h | modified | +3 −1 |