Scott Whitney <scott(at)journyx(dot)com> writes:
> It looks like maybe your semaphores are getting deleted out from under PG as a guess.
Yeah. See
https://www.postgresql.org/docs/devel/static/kernel-resources.html#systemd-removeipc
(Probably we should back-patch that section into older versions of the
docs, as it's not at all PG-version-specific.)
regards, tom lane