Re: Reduce WAL logging of INSERT SELECT

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reduce WAL logging of INSERT SELECT
Date: 2011-08-04 22:07:23
Message-ID: 201108042207.p74M7NG29088@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:
> On Thu, Aug 4, 2011 at 10:46 PM, Bruce Momjian <bruce(at)momjian(dot)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. Are you just throwing out
an idea to try to make me prove it?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2011-08-04 22:09:47 Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https
Previous Message Florian Pflug 2011-08-04 22:01:45 Re: PQescapeByteaConn - returns wrong string for PG9.1 Beta3