Re: [BUGS] BUG #8573: int4range memory consumption

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Jim Nasby <decibel(at)decibel(dot)org>, g(dot)vanluffelen(at)qipc(dot)com, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #8573: int4range memory consumption
Date: 2013-11-04 15:41:51
Message-ID: CAA4eK1J=CS25KB1Z3e-7DrG6nmboO87HZxfjaxBBE7DKNGmjfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Mon, Nov 4, 2013 at 8:15 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
>> On 2013-11-02 15:29:36 -0400, Tom Lane wrote:
>>> Attached is a proposed patch for this. It fixes most of the functions
>>> in printtup.c to use a per-row memory context. (I did not bother to
>>> fix debugtup(), which is used only in standalone mode. If you're doing
>>> queries large enough for mem leaks to be problematic in standalone mode,
>>> you're nuts.)
>
>> FWIW, by that definition I have been nuts several time in the past -
>> without much choice since I was recovering data from a corrupted cluster
>> and the database couldn't be started normally. This now has gotten worse
>> (even in the backbranches) since debugtup won't clean up detoasted data
>> anymore.
>> But I guess the solution for that is to use COPY in those situations
>> which shouldn't have that problem and should work. Also, easier to parse ;)
>
> Considering the output from debugtup goes to stdout where it will be
> intermixed with prompts etc, I'd have to think that COPY is a way better
> solution for dealing with bulk data.
>
> Really I'd like to see standalone mode, in its current form, go away
> completely. I had a prototype patch for allowing psql and other clients
> to interface to a standalone backend. I think getting that finished would
> be a way more productive use of time than improving debugtup.

The last patch including Windows implementation was posted at below
link sometime back.
http://www.postgresql.org/message-id/6C0B27F7206C9E4CA54AE035729E9C382853263C@szxeml509-mbs

If this is the right thing, I can rebase the patch and make it ready.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dan Scott 2013-11-04 17:32:04 Re: BUG #7844: xpath missing entity decoding - bug or feature
Previous Message Andres Freund 2013-11-04 14:46:11 Re: [BUGS] BUG #8573: int4range memory consumption

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-11-04 15:46:06 Re: dsm use of uint64
Previous Message Robert Haas 2013-11-04 15:17:32 Re: [v9.4] row level security