Re: REL_11_STABLE: dsm.c - cannot unpin a segment that is not pinned
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-02-17T20:26:53Z
Lists: pgsql-hackers
On Mon, Feb 18, 2019 at 9:07 AM Justin Pryzby <pryzby@telsasoft.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@telsasoft.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
Commits
-
Fix inconsistent out-of-memory error reporting in dsa.c.
- 406e937d1248 10.8 landed
- 50ae619035be 11.3 landed
- 29ddb548f683 12.0 landed
-
Fix race in dsm_unpin_segment() when handles are reused.
- 7718a9920355 10.8 landed
- 1d93d180454f 11.3 landed
- 0b55aaacec31 12.0 landed
-
Fix race in dsm_attach() when handles are reused.
- 6c0fb9418925 12.0 cited
- faf132449c0c 11.3 cited
-
Fix rare dsa_allocate() failures due to freepage.c corruption.
- 7215efdc005e 12.0 cited
-
Add WL_EXIT_ON_PM_DEATH pseudo-event.
- cfdf4dc4fc96 12.0 cited