pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Benoit Lobréau <benoit.lobreau@gmail.com>
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Cc: Dr. Michael Meskes <michael.meskes@credativ.com>
Subject: Re: Probable memory leak with ECPG and AIX
Date: Sat, 01 Jan 2022 11:35:02 -0500
Message-ID: <2865639.1641054902@sss.pgh.pa.us> (raw)
In-Reply-To: <20220101074055.GA54621@rfd.leadboat.com>
References: <CAECtzeWMVW=b8=DJje_4F=OG9BeYLh-phLcCxZ-FBpii+O=SBQ@mail.gmail.com>
	<20211212073411.GA2218865@rfd.leadboat.com>
	<CAPE8EZ4ca2s5tDVHZzQ=iGh+rD8VX5r4Gk8zTTEeh9VaDOMnuQ@mail.gmail.com>
	<CAPE8EZ42eWAemjj58DO0WArCMDG2VYWut38aAGo9V8QH8ETqrg@mail.gmail.com>
	<20220101074055.GA54621@rfd.leadboat.com>

Noah Misch <noah@leadboat.com> writes:
> I get the same results.  The leak arises because AIX freelocale() doesn't free
> all memory allocated in newlocale().  The following program uses trivial
> memory on GNU/Linux, but it leaks like you're seeing on AIX:

Bleah.

> If you have access to file an AIX bug, I recommend doing so.  If we want
> PostgreSQL to work around this, one idea is to have ECPG do this newlocale()
> less often.  For example, do it once per process or once per connection
> instead of once per ecpg_do_prologue().

It's worse than that: see also ECPGget_desc().  Seems like a case
could be made for doing something about this just on the basis
of cycles expended, never mind freelocale() bugs.

			regards, tom lane





view thread (20+ messages)  latest in thread

Message-ID: <2865639.1641054902@sss.pgh.pa.us>
Permalink:  ../2865639.1641054902@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2865639.1641054902@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, noah@leadboat.com, benoit.lobreau@gmail.com, guillaume@lelarge.info, michael.meskes@credativ.com
  Subject: Re: Probable memory leak with ECPG and AIX
  In-Reply-To: <2865639.1641054902@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox