Re: ERROR: too many dynamic shared memory segments

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Jakub Glapa <jakub.glapa@gmail.com>, Forums postgresql <pgsql-general@postgresql.org>
Date: 2017-11-27T19:16:25Z
Lists: pgsql-hackers, pgsql-general
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> Ah, so you have many Gather nodes under Append?  That's one way to eat
> arbitrarily many DSM slots.  We allow for 64 + 2 * max_backends.  Does
> it help if you increase max_connections?  I am concerned about the
> crash failure mode you mentioned in the first email though: we should
> always be able to handle that condition gracefully.

I suspect this is an instance of the issue I complained about before [1]
that parallel query is unable to cope with worker start failure.

			regards, tom lane

[1] https://www.postgresql.org/message-id/4905.1492813727@sss.pgh.pa.us


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.