Re: REL_11_STABLE: dsm.c - cannot unpin a segment that is not pinned

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: REL_11_STABLE: dsm.c - cannot unpin a segment that is not pinned
Date: 2019-02-17 20:26:53
Message-ID: CAEepm=0kMunPC0hhuT0VC-5dfMT3K-xsToJHkTznA6yrSARsPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 18, 2019 at 9:07 AM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> On Sun, Feb 17, 2019 at 01:41:45PM -0600, Justin Pryzby wrote:
> > 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(at)telsasoft(dot)com> wrote:
> > > > Thanks, will leave it spinning overnight.
> >
> > No errors in ~36 hours (126 CPU-hrs), so that seems to work. Thanks.

Great news. I will commit that.

> Actually...
>
> On killing the postmaster having completed this stress test, one of the
> backends was left running and didn't die on its own. It did die gracefully
> when I killed the backend or the client.
>
> I was able to repeat the result, on first try, but took numerous attempts to
> repeat the 2nd and 3rd time to save pg_stat_activity.
>
> Is there some issue regarding dsm_postmaster_shutdown ?

Huh. What exactly do you mean by "killing the postmaster"? If you
mean SIGKILL or something, one problem with 11 is that
gather_readnext() doesn't respond to postmaster death. I fixed that
(and every similar place) in master with commit cfdf4dc4fc9, like so:

- WaitLatch(MyLatch, WL_LATCH_SET, 0,
WAIT_EVENT_EXECUTE_GATHER);
+ (void) WaitLatch(MyLatch, WL_LATCH_SET |
WL_EXIT_ON_PM_DEATH, 0,
+
WAIT_EVENT_EXECUTE_GATHER);

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2019-02-17 20:35:37 Re: REL_11_STABLE: dsm.c - cannot unpin a segment that is not pinned
Previous Message Justin Pryzby 2019-02-17 20:07:00 Re: REL_11_STABLE: dsm.c - cannot unpin a segment that is not pinned