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:26:53
Message-ID: 44D0379D.10805@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers pgsql-patches

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).

Thoughts?

Thanks,

Joe

Attachment Content-Type Size
multi-insert-memleak.r00.diff text/x-patch 3.2 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Joshua D. Drake 2006-08-02 05:50:06 Re: Values list-of-targetlists patch for comments (was Re:
Previous Message Joe Conway 2006-08-02 03:47:42 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-08-02 05:50:06 Re: Values list-of-targetlists patch for comments (was Re:
Previous Message Michael Fuhr 2006-08-02 04:59:49 pg_dump dumping entire system catalogs

Browse pgsql-patches by date

  From Date Subject
Next Message Joshua D. Drake 2006-08-02 05:50:06 Re: Values list-of-targetlists patch for comments (was Re:
Previous Message Joe Conway 2006-08-02 03:47:42 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]