From: Hazuki Amamiya <hatsuki_a-ie@yahoo.com.hk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: Possible memory leak in PostgreSQL 12.2 on truncate, insert or delete when type interval is involved
Date: Tue, 18 Feb 2020 03:48:49 +0000 (UTC)
Message-ID: <101845571.3678442.1581997729928@mail.yahoo.com> (raw)
In-Reply-To: <24064.1581978144@sss.pgh.pa.us>
References: <26594723.3545403.1581955480512.ref@mail.yahoo.com>
<26594723.3545403.1581955480512@mail.yahoo.com>
<24064.1581978144@sss.pgh.pa.us>
Hi Tom,
Indeed my scripts seems not able to replicate what happened in my production server. With my production script in my production server, both RES and VIRT do increase. Just I am unable to replicate it with a simple script and simple database schema.
Since the workaround is rather easy by establishing a new connection session every certain time, I would like to close this bug report.
Thanks for your help.
hazuki
On Tuesday, 18 February 2020, 06:22:41 GMT+8, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Hazuki Amamiya <hatsuki_a-ie@yahoo.com.hk> writes:
> Recently, there is a memory leak in the game server I hosted. After checking the log, the leak seems appeared after I upgrade PostgreSQL from 11 to 12.1, and I have no luck even I upgraded the PostgreSQL to 12.2 [PostgreSQL 12.2 (Debian 12.2-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit] in Debian 10.
FWIW, I see no sign of a memory leak with this example.
> While the script continuing to run, the RES (shown in command “top”) will keep increasing forever.
Does it really increase "forever"? A fairly common cause of confusion
is that top will report the process' space consumption as gradually
increasing until all of Postgres' shared buffers have been touched
(after which the number stops growing). That's not a leak, it's just
an artifact of how top chooses to count usage of shared memory.
Usually, if you don't see the total "VIRT" column increasing, there's
no real leak happening.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: hatsuki_a-ie@yahoo.com.hk, tgl@sss.pgh.pa.us
Subject: Re: Possible memory leak in PostgreSQL 12.2 on truncate, insert or delete when type interval is involved
In-Reply-To: <101845571.3678442.1581997729928@mail.yahoo.com>
References: <26594723.3545403.1581955480512.ref@mail.yahoo.com> <26594723.3545403.1581955480512@mail.yahoo.com> <24064.1581978144@sss.pgh.pa.us> <101845571.3678442.1581997729928@mail.yahoo.com>
* 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