BUG #16707: Memory leak

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: kurt(at)roeckx(dot)be
Subject: BUG #16707: Memory leak
Date: 2020-11-09 21:07:21
Message-ID: 16707-f5df308978a55bf8@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16707
Logged by: Kurt Roeckx
Email address: kurt(at)roeckx(dot)be
PostgreSQL version: 12.4
Operating system: Debian


It seems that since I switched from PostgreSQL 9.5 to 12, I started to have
a memory leak. This results in PostgreSQL dying because it can no longer
allocate memory, in which case it restarts and most of the time everything
then just recovers, which is why I'm rather late in noticing the problem.

I migrated early April to 12.2-2.pgdg100+1, and I'm currently running

I'm running 2 database on that that server, but I only seem to have issues
with 1 of them, only the processes that connect to that database seem to
have a memory leak.

The only database I have a problem with is the one used by synapse

My configuration has:
shared_buffers = 4096MB
work_mem = 64MB
maintenance_work_mem = 64MB

The VSZ started around 4.3 GB, now is at 5.4 GB, of which 5.1 is RSS. The
VSZ and RSS grow over time. There are 10 such processes, all connections to
the synapse database.
All other processes, including a connection the other database, still have a
VSZ of 4.3 GB. The stats collector is the exception with only 64MB VSZ.

I've put log_statement to "all" for a short while to see the queries that
were happening. The only type of query I see that's different to what all
the other databases do is that it uses "BEGIN ISOLATION LEVEL REPEATABLE
READ", while all the others just use "BEGIN". Not sure if that's related or



Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-11-09 21:34:33 Re: BUG #16707: Memory leak
Previous Message Wolfgang Walther 2020-11-09 20:29:51 Re: BUG #16706: insert into on conflict(pk) do update error violates not-null constraint