From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Shared memory leak on DSM slot exhaustion |
Date: | 2020-01-31 18:37:40 |
Message-ID: | CA+TgmoZ3tfsABrAO8EtSiOYuWyk0pMux6OtR1vLzQGnjKW9ATw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jan 30, 2020 at 4:54 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> As reported over on pgsql-general[1], we leak shared memory when we
> run out of DSM slots. To see this, add the random-run-out-of-slots
> hack I showed in that thread, create and analyze a table t(i) with a
> million integers, run with dynamic_shared_memory_type=mmap, and try
> SELECT COUNT(*) FROM t t1 JOIN t t2 USING (i) a few times and you'll
> see that pgbase/pg_dynshmem fills up with leaked memory segments each
> time an out-of-slots errors is raised. (It happens with all DSM
> types, but then the way to list the segments varies or there isn't
> one, depending on type and OS.) Here's a draft patch to fix that.
Whoops. The patch looks OK to me.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Jordan Deitch | 2020-01-31 18:59:28 | get a relations DDL server-side |
Previous Message | Ashwin Agrawal | 2020-01-31 18:05:23 | Re: Extracting only the columns needed for a query |