pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Heath Lord <heath.lord@crunchydata.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: joseph.ayers@crunchydata.com
Subject: Re: "could not reattach to shared memory" on buildfarm member dory
Date: Tue, 02 Apr 2019 10:09:00 -0400
Message-ID: <18088.1554214140@sss.pgh.pa.us> (raw)
In-Reply-To: <20190402135442.GA1173872@rfd.leadboat.com>
References: <20180424070646.GA2693533@rfd.leadboat.com>
	<17897.1525108069@sss.pgh.pa.us>
	<29823.1525132900@sss.pgh.pa.us>
	<20180501002419.onmikldoe2ssjauq@alap3.anarazel.de>
	<18056.1525148010@sss.pgh.pa.us>
	<22096.1525188710@sss.pgh.pa.us>
	<20180819020007.GD3795674@rfd.leadboat.com>
	<14554.1537811585@sss.pgh.pa.us>
	<20180925150512.GA3990982@rfd.leadboat.com>
	<20181203053506.GB2860387@rfd.leadboat.com>
	<20190402135442.GA1173872@rfd.leadboat.com>

Noah Misch <noah@leadboat.com> writes:
> I can reproduce the 4 MiB allocations described
> in https://postgr.es/m/29823.1525132900@sss.pgh.pa.us; a few times per
> "vcregress check", they emerge in the middle of PGSharedMemoryReAttach().
> The 4 MiB allocations are stacks for new threads of the default thread
> pool[1].

Hah!  It is great to finally have an understanding of what is happening
here.

I worry that your proposed fix is unstable, in particular this assumption
seems shaky:

> + * ... The idea is that, if the allocator handed out
> + * REGION1 pages before REGION2 pages at one occasion, it will do so whenever
> + * both regions are free.

I wonder whether it's possible to address this by configuring the "default
thread pool" to have only one thread?  It seems like the extra threads are
just adding backend startup overhead to no benefit, since we won't use 'em.

			regards, tom lane





view thread (33+ messages)  latest in thread

Message-ID: <18088.1554214140@sss.pgh.pa.us>
Permalink:  ../18088.1554214140@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18088.1554214140@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, noah@leadboat.com, heath.lord@crunchydata.com, sfrost@snowman.net, andres@anarazel.de, thomas.munro@enterprisedb.com, pgsql-hackers@lists.postgresql.org, joseph.ayers@crunchydata.com
  Subject: Re: "could not reattach to shared memory" on buildfarm member dory
  In-Reply-To: <18088.1554214140@sss.pgh.pa.us>

* 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