From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
Cc: | 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 19:41:45 |
Message-ID: | 20190217194145.GA28750@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
> > 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.
From | Date | Subject | |
---|---|---|---|
Next Message | James Coleman | 2019-02-17 19:44:24 | Re: 2019-03 CF Summary / Review - Tranche #2 |
Previous Message | Andres Freund | 2019-02-17 19:27:20 | Re: allow online change primary_conninfo |