Re: Values list-of-targetlists patch for comments (was Re:

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgreSQL(dot)org
Subject: Re: Values list-of-targetlists patch for comments (was Re:
Date: 2006-08-02 05:52:31
Message-ID: 44D03D9F.80203@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers pgsql-patches

Joe Conway wrote:
> Tom Lane wrote:
>
>> Here's what I've got so far. I think there's probably more gold to be
>> mined in terms of reducing runtime memory consumption (I don't like the
>> list_free_deep bit, we should use a context), but functionally it seems
>> complete.
>
> I checked out memory usage, and it had regressed to about 1.4 GB (from
> 730 MB as reported yesterday) for 2 million inserts of 2 integers (i.e.
> with the php script I've been using).
>
> I know you're not too happy with the attached approach to solving this,
> but I'm not sure how creating a memory context is going to help. Part of
> the problem is that the various transformXXX functions sometimes return
> freshly palloc'd memory, and sometimes return the pointer they are given.
>
> Anyway, with the attached diff, the 2 million inserts case is back to
> about 730 MB memory use, and speed is pretty much the same as reported
> yesterday (i.e both memory use and performance better than mysql with
> innodb tables).

Of course it also breaks a bunch of regression tests -- I guess that
just points to the fragility of this approach.

This patch retains the memory consumption savings but doesn't break any
regression tests...

Joe

Attachment Content-Type Size
multi-insert-memleak.r01.diff text/x-patch 2.9 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Michael Glaesemann 2006-08-02 06:54:00 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Previous Message Joshua D. Drake 2006-08-02 05:50:06 Re: Values list-of-targetlists patch for comments (was Re:

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Glaesemann 2006-08-02 06:54:00 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Previous Message Joshua D. Drake 2006-08-02 05:50:06 Re: Values list-of-targetlists patch for comments (was Re:

Browse pgsql-patches by date

  From Date Subject
Next Message Michael Glaesemann 2006-08-02 06:54:00 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Previous Message Joshua D. Drake 2006-08-02 05:50:06 Re: Values list-of-targetlists patch for comments (was Re: