Re: [BUGS] BUG #8573: int4range memory consumption - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [BUGS] BUG #8573: int4range memory consumption
Date
Msg-id CAA4eK1J=CS25KB1Z3e-7DrG6nmboO87HZxfjaxBBE7DKNGmjfQ@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #8573: int4range memory consumption  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] BUG #8573: int4range memory consumption  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Nov 4, 2013 at 8:15 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andres Freund <andres@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [v9.4] row level security
Next
From: Robert Haas
Date:
Subject: Re: dsm use of uint64