Re: dsa_allocate() faliure - Mailing list pgsql-performance

From Tom Lane
Subject Re: dsa_allocate() faliure
Date
Msg-id 4763.1517243829@sss.pgh.pa.us
Whole thread Raw
In response to dsa_allocate() faliure  (Rick Otten <rottenwindfish@gmail.com>)
Responses Re: dsa_allocate() faliure  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-performance
Rick Otten <rottenwindfish@gmail.com> 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


pgsql-performance by date:

Previous
From: Rick Otten
Date:
Subject: dsa_allocate() faliure
Next
From: Thomas Munro
Date:
Subject: Re: dsa_allocate() faliure