Re: Probable memory leak with ECPG and AIX

From: Noah Misch <noah(at)leadboat(dot)com>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>, "Dr(dot) Michael Meskes" <michael(dot)meskes(at)credativ(dot)com>
Subject: Re: Probable memory leak with ECPG and AIX
Date: 2021-12-12 07:34:11
Message-ID: 20211212073411.GA2218865@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 10, 2021 at 03:40:50PM +0100, Guillaume Lelarge wrote:
> After some time, the client
> crashes with a segfault error. According to him, it consumed around 256MB.
> What's weird is that it works great on Linux, but crashed on AIX.

That almost certainly means he's using a 32-bit binary with the default heap
size. To use more heap on AIX, build 64-bit or override the heap size. For
example, "env LDR_CNTRL=MAXDATA=0x80000000 ./a.out" gives 2GiB of heap. See
https://www.postgresql.org/docs/devel/installation-platform-notes.html#INSTALLATION-NOTES-AIX
for more ways to control heap size. While that documentation focuses on the
server, the same techniques apply to clients like your test program.

That said, I don't know why your test program reaches 256MB on AIX. On
GNU/Linux, it uses a lot less. What version of PostgreSQL provided your
client libraries?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-12-12 08:09:37 Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Previous Message Tom Lane 2021-12-12 06:24:24 Re: pg_dump versus ancient server versions