Re: Probable memory leak with ECPG and AIX
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: Guillaume Lelarge <guillaume@lelarge.info>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>, "Dr. Michael Meskes" <michael.meskes@credativ.com>
Date: 2021-12-12T07:34:11Z
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?
Commits
-
Fix previous commit's ecpg_clocale for ppc Darwin.
- f5e4d64bb338 10.22 landed
- 1cad30e3ba82 11.17 landed
- a4240139fc76 12.12 landed
- 97b005f3fb1b 13.8 landed
- 8533eb181ae4 15.0 landed
- 463a841d7407 14.5 landed
- e2bc242833da 16.0 landed
-
ecpglib: call newlocale() once per process.
- d68b731a1504 11.17 landed
- 12b2a2369deb 10.22 landed
- b4d7e92bd535 13.8 landed
- 7a28f7cb09bf 15.0 landed
- 5e0b8f3f4f87 12.12 landed
- 5b94e2bd4d54 14.5 landed
- 5633836ef306 16.0 landed