From: | raf <raf(at)raf(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Frequent "pg_ctl status" removing(?) semaphores (unlikely) |
Date: | 2016-09-30 22:56:25 |
Message-ID: | 20160930225625.GA1260@raf.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Michael Paquier wrote:
> On Tue, Sep 27, 2016 at 2:13 PM, raf <raf(at)raf(dot)org> wrote:
> > So, my qestion is, is it possible that "pg_ctl status" could be
> > removing postgres's semaphores and can I stop it? It seems
> > extremely unlikely. So, if it isn't, what else could it be?
> > Systemd perhaps? It's been known to kill screen/tmux/nohup
> > processes when a user logs out in its keenness to clean up but
> > that may be clutching at straws.
>
> systemd sometimes has fun removing semaphores. See here for example:
> https://www.postgresql.org/message-id/CAK7tEys9-O4BTERbs3Xuk2BfFNNd55u2sM9j5R2Fi7v6BHjrQw@mail.gmail.com
> --
> Michael
Thanks, Michael. That's it. I added RemoveIPC=no to
/etc/systemd/logind.conf, restarted systemd-logind,
and re-enabled the cron job, and it's been fine for
a whole day.
Now to do the same on all my other systemd-afflicted
hosts (just on principal). :-)
It looks to me like a bug in systemd. If it's removing
IPC resources because it thinks that the postgres user has
completely "logged out", why does it take over 100 "logins"
(i.e. cronjobs) before it decides that the postgres user
is completely logged out. What was the difference between all
the previous cronjobs and the one where it finally decided
to remove the semaphores? Why didn't it remove them after the
first cronjob had completed? And why did it think the postgres
user was completely "logged out" when it's also running the
postgres server processes? It might be because it sees the
postgres server processes as belonging to my user "slice"
because I started it even though it's running as the postgres
user. That doesn't seem like a useful way of viewing things.
But this is all rhetorical. No doubt there are reasons for this
but I don't care as long as I can turn it off.
Thanks again,
raf
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2016-10-01 00:43:07 | Re: [ANNOUNCE] pgAdmin 4 v1.0 Released! |
Previous Message | David Rowley | 2016-09-30 21:52:44 | Re: Parallel query only when EXPLAIN ANALYZEd |