Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lP67v-0000wH-KY for pgsql-general@arkaria.postgresql.org; Wed, 24 Mar 2021 16:12:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lP67t-0004Zl-Jm for pgsql-general@arkaria.postgresql.org; Wed, 24 Mar 2021 16:12:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lP67t-0004Ze-Bs for pgsql-general@lists.postgresql.org; Wed, 24 Mar 2021 16:12:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lP67n-000266-77 for pgsql-general@lists.postgresql.org; Wed, 24 Mar 2021 16:12:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12OGCmcv1100687; Wed, 24 Mar 2021 12:12:48 -0400 From: Tom Lane To: Laurenz Albe cc: Albrecht =?ISO-8859-1?Q?Dre=DF?= , pgsql-general@lists.postgresql.org Subject: Re: ERROR: could not attach to dynamic shared area In-reply-to: References: Comments: In-reply-to Laurenz Albe message dated "Wed, 24 Mar 2021 17:09:32 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1100685.1616602368.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 24 Mar 2021 12:12:48 -0400 Message-ID: <1100686.1616602368@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Laurenz Albe writes: > On Wed, 2021-03-24 at 09:01 +0100, Albrecht Dre=C3=9F wrote: >> in the logs of my database server, I found the following message: >>> ERROR: could not attach to dynamic shared area >>> LOG: background worker "parallel worker" (PID 51151) exited with exit = code 1 > ... it could be a race condition: a parallel query finished rather fast, > but one of the parallel workers took long to start up, so when it tries = to > attach to the dynamic shared memory segment used to exchange data betwee= n the > parallel processes, it realizes that everybody else has already left and > destroyed the memory segment. If the error only appeared in the log, and wasn't reported to the client, then this theory seems pretty plausible. regards, tom lane