On 2015-07-10 19:23:28 +0900, Fujii Masao wrote: > Maybe I'm missing something. But I start wondering why TRUNCATE > and INSERT (or even all the operations on the table created at > the current transaction) need to be WAL-logged while COPY can be > optimized. If no WAL records are generated on that table, the problem > we're talking about seems not to occur. Also this seems safe and > doesn't degrade the performance of data loading. Thought?
Skipping WAL logging means that you need to scan through the whole shrared buffers to write out dirty buffers and fsync the segments. A single insert wal record is a couple orders of magnitudes cheaper than that. Essentially doing this juts for COPY is a heuristic. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers