On Thu, Aug 19, 2021 at 3:05 PM Michael Paquier <mich...@paquier.xyz> wrote: > > The thread of this open item is now idle for 10 days and there does > not seem to be a lot of progress. Bruce, this is assigned to you. > Are you planning to look at it?
I'm really sorry for the lack of answer on my side, I had too many duties at work to thoroughly look at the implication of clearing MyBEEntry in the pgstat_beshutdown_hook :( With what I've seen so far I didn't find any evidence that it could lead to any new problem (it should actually make things slightly safer) and couldn't hit any issue with some testing. Opinion from someone more familiar with pgstats is of course welcome. While reading the various code, I also found this incorrect comment in backend_status.c: /* exposed so that progress.c can access it */ PgBackendStatus *MyBEEntry = NULL; progress.c was apparently renamed to backend_progress.c sometime during e1025044 development (Split backend status and progress related functionality out of pgstat.c.). So I'm +1 for the fix originally suggested by Andres.