pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: pgsql-hackers@postgresql.org
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Subject: Re: pg11.1: dsa_area could not attach to segment
Date: Tue, 5 Feb 2019 20:10:47 -0600
Message-ID: <20190206021047.GU29720@telsasoft.com> (raw)
In-Reply-To: <20190205183454.GS29720@telsasoft.com>
References: <20181231221734.GB25379@telsasoft.com>
	<20190205163509.GM29720@telsasoft.com>
	<20190205183454.GS29720@telsasoft.com>

I should have included query plan for the query which caused the "could not
find free pages" error.

This is a contrived query which I made up to try to exercise/stress bitmap
scans based on Thomas's working hypothesis for this error/bug.  This seems to
be easier to hit than the other error ("could not attach to segment") - a loop
around this query has run into "free pages" several times today.

explain (analyze,costs off,timing off) SELECT * FROM eric_enodeb_metrics WHERE start_time>='2017-10-01' AND (site_id<1900 OR site_id>2700)

 Gather (actual rows=82257 loops=1)
   Workers Planned: 3
   Workers Launched: 3
   ->  Parallel Append (actual rows=20564 loops=4)
         ->  Parallel Bitmap Heap Scan on eric_enodeb_201901 (actual rows=6366 loops=4)
               Recheck Cond: ((site_id < 1900) OR (site_id > 2700))
               Filter: (start_time >= '2017-10-01 00:00:00-04'::timestamp with time zone)
               Heap Blocks: exact=2549
               ->  BitmapOr (actual rows=0 loops=1)
                     ->  Bitmap Index Scan on eric_enodeb_201901_site_idx (actual rows=0 loops=1)
                           Index Cond: (site_id < 1900)
                     ->  Bitmap Index Scan on eric_enodeb_201901_site_idx (actual rows=25463 loops=1)
                           Index Cond: (site_id > 2700)
         ->  Parallel Bitmap Heap Scan on eric_enodeb_201810 (actual rows=15402 loops=1)
               Recheck Cond: ((site_id < 1900) OR (site_id > 2700))
               Filter: (start_time >= '2017-10-01 00:00:00-04'::timestamp with time zone)
               ->  BitmapOr (actual rows=0 loops=1)
                     ->  Bitmap Index Scan on eric_enodeb_201810_site_idx (actual rows=0 loops=1)
                           Index Cond: (site_id < 1900)
                     ->  Bitmap Index Scan on eric_enodeb_201810_site_idx (actual rows=15402 loops=1)
                           Index Cond: (site_id > 2700)
         ->  Parallel Bitmap Heap Scan on eric_enodeb_201812 (actual rows=14866 loops=1)
               Recheck Cond: ((site_id < 1900) OR (site_id > 2700))
               Filter: (start_time >= '2017-10-01 00:00:00-04'::timestamp with time zone)
               ->  BitmapOr (actual rows=0 loops=1)
                     ->  Bitmap Index Scan on eric_enodeb_201812_site_idx (actual rows=0 loops=1)
                           Index Cond: (site_id < 1900)
                     ->  Bitmap Index Scan on eric_enodeb_201812_site_idx (actual rows=14866 loops=1)
                           Index Cond: (site_id > 2700)
         ->  Parallel Bitmap Heap Scan on eric_enodeb_201811 (actual rows=7204 loops=2)
               Recheck Cond: ((site_id < 1900) OR (site_id > 2700))
               Filter: (start_time >= '2017-10-01 00:00:00-04'::timestamp with time zone)
               Heap Blocks: exact=7372
               ->  BitmapOr (actual rows=0 loops=1)
                     ->  Bitmap Index Scan on eric_enodeb_201811_site_idx (actual rows=0 loops=1)
                           Index Cond: (site_id < 1900)
                     ->  Bitmap Index Scan on eric_enodeb_201811_site_idx (actual rows=14408 loops=1)
                           Index Cond: (site_id > 2700)
         ->  Parallel Bitmap Heap Scan on eric_enodeb_201902 (actual rows=5128 loops=1)
               Recheck Cond: ((site_id < 1900) OR (site_id > 2700))
               Filter: (start_time >= '2017-10-01 00:00:00-04'::timestamp with time zone)
               Heap Blocks: exact=3374
               ->  BitmapOr (actual rows=0 loops=1)
                     ->  Bitmap Index Scan on eric_enodeb_201902_site_idx (actual rows=0 loops=1)
                           Index Cond: (site_id < 1900)
                     ->  Bitmap Index Scan on eric_enodeb_201902_site_idx (actual rows=5128 loops=1)
                           Index Cond: (site_id > 2700)
         [...]

Justin




view thread (32+ messages)  latest in thread

Message-ID: <20190206021047.GU29720@telsasoft.com>
Permalink:  ../20190206021047.GU29720@telsasoft.com/
Also on:    postgresql.org/message-id/20190206021047.GU29720@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, thomas.munro@enterprisedb.com
  Subject: Re: pg11.1: dsa_area could not attach to segment
  In-Reply-To: <20190206021047.GU29720@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox