Re: WAL logging problem in 9.4.3? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: WAL logging problem in 9.4.3?
Date
Msg-id 20150710102902.GL340@alap3.anarazel.de
Whole thread Raw
In response to Re: WAL logging problem in 9.4.3?  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: WAL logging problem in 9.4.3?
Next
From: Heikki Linnakangas
Date:
Subject: Re: WAL logging problem in 9.4.3?