Re: ERROR: too many dynamic shared memory segments

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>, Jakub Glapa <jakub.glapa@gmail.com>, Forums postgresql <pgsql-general@postgresql.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-11-28T13:43:45Z
Lists: pgsql-hackers, pgsql-general

Attachments

On Tue, Nov 28, 2017 at 2:32 AM, Dilip Kumar <dilipbalaut@gmail.com> wrote:
>  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.

So, create the pstate and then pretend we didn't?  Why not just avoid
creating it in the first place, like this?

I haven't checked whether this fixes the bug, but if it does, we can
avoid introducing an extra branch in BitmapHeapNext.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Commits

  1. Be more wary about shm_toc_lookup failure.

  2. Fix ReinitializeParallelDSM to tolerate finding no error queues.

  3. Teach bitmap heap scan to cope with absence of a DSA.

  4. Don't be so trusting that shm_toc_lookup() will always succeed.