Re: ERROR: too many dynamic shared memory segments
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Jakub Glapa <jakub.glapa@gmail.com>,
Forums postgresql <pgsql-general@postgresql.org>, Robert Haas <robertmhaas@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-11-28T07:32:56Z
Lists: pgsql-hackers, pgsql-general
Attachments
- bug_fix_in_pbhs_when_dsa_not_initialized.patch (application/octet-stream) patch
On Tue, Nov 28, 2017 at 4:18 AM, Thomas Munro <thomas.munro@enterprisedb.com > wrote: > On Tue, Nov 28, 2017 at 10:05 AM, Jakub Glapa <jakub.glapa@gmail.com> > wrote: > > As for the crash. I dug up the initial log and it looks like a > segmentation > > fault... > > > > 2017-11-23 07:26:53 CET:192.168.10.83(35238):user@db:[30003]: ERROR: > too > > many dynamic shared memory segments > > I think there are two failure modes: one of your sessions showed the > "too many ..." error (that's good, ran out of slots and said so and > our error machinery worked as it should), and another crashed with a > segfault, because it tried to use a NULL "area" pointer (bad). I > think this is a degenerate case where we completely failed to launch > parallel query, but we ran the parallel query plan anyway and this > code thinks that the DSA is available. Oops. > I think BitmapHeapScan check whether dsa is valid or not if DSA is not valid then it should assume it's non-parallel plan. Attached patch should fix the issue. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
Commits
-
Be more wary about shm_toc_lookup failure.
- 957ff087c822 11.0 landed
- 34653bc9833d 10.2 landed
-
Fix ReinitializeParallelDSM to tolerate finding no error queues.
- dba6e75c1113 10.2 landed
- 445dbd82a319 11.0 landed
-
Teach bitmap heap scan to cope with absence of a DSA.
- ec7629dfb98a 10.2 landed
- c6755e233be1 11.0 landed
-
Don't be so trusting that shm_toc_lookup() will always succeed.
- d4663350646c 10.0 cited