Re: ERROR: too many dynamic shared memory segments
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>,
Thomas Munro <thomas.munro@enterprisedb.com>,
Jakub Glapa <jakub.glapa@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-02-02T20:01:15Z
Lists: pgsql-hackers, pgsql-general
Robert Haas <robertmhaas@gmail.com> writes: > That turned out to produce more than one problem. I find that the > select_parallel test then fails like this: > ERROR: could not find key 18446744073709486082 in shm TOC at 0x10be98040 > The fix for that problem seems to be: > /* Recreate error queues. */ > error_queue_space = > - shm_toc_lookup(pcxt->toc, PARALLEL_KEY_ERROR_QUEUE, false); > + shm_toc_lookup(pcxt->toc, PARALLEL_KEY_ERROR_QUEUE, true); > + Assert(pcxt->nworkers == 0 || error_queue_space != NULL); I happened across this patch while preparing the release notes, and I'm quite distressed by it, because it completely breaks the point of what I'd done in commit d46633506 (to wit, to not just blindly assume, nor just Assert, that shm_toc_lookup always succeeds). Do you mind if I change that Assert to a run-time test? regards, tom lane
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