Re: Reduce WAL logging of INSERT SELECT - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Reduce WAL logging of INSERT SELECT
Date
Msg-id CA+U5nMKoGrg9uZaF9gsy45WoBQ-ds6Q6Vv3JUtxpLc758+TGkg@mail.gmail.com
Whole thread Raw
In response to Re: Reduce WAL logging of INSERT SELECT  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Thu, Aug 4, 2011 at 11:07 PM, Bruce Momjian <bruce@momjian.us> wrote:
> Simon Riggs wrote:
>> On Thu, Aug 4, 2011 at 10:46 PM, Bruce Momjian <bruce@momjian.us> wrote:
>>
>> > Right. ?I brought up SELECT INTO because you could make the argument
>> > that INSERT ... SELECT is not a utility command like the other ones and
>> > therefore can't be done easily, but CREATE TABLE AS is internal SELECT
>> > INTO and implemented in execMain.c, which I think is where INSERT ...
>> > SELECT would also be implemented.
>>
>> What you should be asking is whether the optimisation would be
>> effective for INSERT SELECT, or even test it.
>>
>> My observation is that the optimisation is only effective for very
>> large loads that cause I/O. As RAM sizes get bigger, I'm inclined to
>> remove the optimisation and make it optional since it is ineffective
>> in many cases and negative benefit for smaller cases.
>
> I am confused how generating WAL traffic that is larger than the heap
> file we are fsync'ing can possibly be slower.

I'm telling you what I know to be true as an assistance to you.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: psql: display of object comments
Next
From: Andrew Dunstan
Date:
Subject: Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https