Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1egCQm-0008Jp-NT for pgsql-performance@arkaria.postgresql.org; Mon, 29 Jan 2018 16:37:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egCQl-0005Gx-CS for pgsql-performance@arkaria.postgresql.org; Mon, 29 Jan 2018 16:37:15 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1egCQl-0005Gn-2M for pgsql-performance@lists.postgresql.org; Mon, 29 Jan 2018 16:37:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1egCQi-0003S4-G3 for pgsql-performance@lists.postgresql.org; Mon, 29 Jan 2018 16:37:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w0TGb9ui004764; Mon, 29 Jan 2018 11:37:09 -0500 From: Tom Lane To: Rick Otten cc: pgsql-performance@lists.postgresql.org, Robert Haas , Thomas Munro Subject: Re: dsa_allocate() faliure In-reply-to: References: Comments: In-reply-to Rick Otten message dated "Mon, 29 Jan 2018 11:19:43 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4762.1517243829.1@sss.pgh.pa.us> Date: Mon, 29 Jan 2018 11:37:09 -0500 Message-ID: <4763.1517243829@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Rick Otten writes: > I'm wondering if there is anything I can tune in my PG 10.1 database to > avoid these errors: > $ psql -f failing_query.sql > psql:failing_query.sql:46: ERROR: dsa_allocate could not find 7 free pages > CONTEXT: parallel worker Hmm. There's only one place in the source code that emits that message text: /* * Ask the free page manager for a run of pages. This should always * succeed, since both get_best_segment and make_new_segment should * only return a non-NULL pointer if it actually contains enough * contiguous freespace. If it does fail, something in our backend * private state is out of whack, so use FATAL to kill the process. */ if (!FreePageManagerGet(segment_map->fpm, npages, &first_page)) elog(FATAL, "dsa_allocate could not find %zu free pages", npages); Now maybe that comment is being unreasonably optimistic, but it sure appears that this is supposed to be a can't-happen case, in which case you've found a bug. cc'ing the DSA authors for comment. regards, tom lane