pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: REL_11_STABLE: dsm.c - cannot unpin a segment that is not pinned
Date: Sun, 17 Feb 2019 13:41:45 -0600
Message-ID: <20190217194145.GA28750@telsasoft.com> (raw)
In-Reply-To: <CAEepm=1gBdB_qo_eohvYtGb9=N4Gvxas3UoA6XdX_Kg1isEcNA@mail.gmail.com>
References: <20190216023854.GF30291@telsasoft.com>
	<CAEepm=0t8o=Wh4wi0H58q3G1dqoj6ZYU-zu9DMp29RkVMGSvNw@mail.gmail.com>
	<20190216043107.GG30291@telsasoft.com>
	<CAEepm=1gBdB_qo_eohvYtGb9=N4Gvxas3UoA6XdX_Kg1isEcNA@mail.gmail.com>

On Sat, Feb 16, 2019 at 09:16:01PM +1300, Thomas Munro wrote:
> On Sat, Feb 16, 2019 at 5:31 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> > Thanks, will leave it spinning overnight.

No errors in ~36 hours (126 CPU-hrs), so that seems to work.  Thanks.

> > Do you know if any of the others should also be changed ?
> 
> Good question, let me double check...
> 
> > $ grep 'refcnt == 0' src/backend/storage/ipc/dsm.c
> >                 if (refcnt == 0)
> 
> That's dsm_cleanup_using_control_segment() and runs when starting up
> before any workers can be running to clean up after a preceding crash,
> so it's OK (if it's 1, meaning we crashed while that slot was going
> away, we'll try to destroy it again, which is correct).  Good.
> 
> >                 if (dsm_control->item[i].refcnt == 0)
> 
> That's dsm_postmaster_shutdown(), similar but at shutdown time, run by
> the postmaster, and it errs on the side of trying to destroy.  Good.
> 
> >                 if (dsm_control->item[i].refcnt == 0)
> 
> That's dsm_create(), and it's looking specifically for a free slot,
> and that's 0 only, it'll step over used/active (refcnt > 1) and
> used/going-away (refcnt == 1).  Good.




view thread (9+ messages)  latest in thread

Message-ID: <20190217194145.GA28750@telsasoft.com>
Permalink:  ../20190217194145.GA28750@telsasoft.com/
Also on:    postgresql.org/message-id/20190217194145.GA28750@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, thomas.munro@enterprisedb.com
  Subject: Re: REL_11_STABLE: dsm.c - cannot unpin a segment that is not pinned
  In-Reply-To: <20190217194145.GA28750@telsasoft.com>
  References: <20190216023854.GF30291@telsasoft.com> <CAEepm=0t8o=Wh4wi0H58q3G1dqoj6ZYU-zu9DMp29RkVMGSvNw@mail.gmail.com> <20190216043107.GG30291@telsasoft.com> <CAEepm=1gBdB_qo_eohvYtGb9=N4Gvxas3UoA6XdX_Kg1isEcNA@mail.gmail.com> <20190217194145.GA28750@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