Re: [Patch] Create a new session in postmaster by calling setsid() - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [Patch] Create a new session in postmaster by calling setsid()
Date
Msg-id 20180913192438.et575bl6hf72bhcc@alap3.anarazel.de
Whole thread Raw
In response to Re: [Patch] Create a new session in postmaster by calling setsid()  (Paul Guo <pguo@pivotal.io>)
Responses Re: [Patch] Create a new session in postmaster by calling setsid()
List pgsql-hackers
Hi,

On 2018-09-13 15:27:58 +0800, Paul Guo wrote:
> From the respective of users instead of developers, I think for such
> important
> service, tty should be dissociated, i.e. postmaster should be daemonized by
> default (and even should have default log filename?) or be setsid()-ed at
> least.

I don't think it'd be good to switch to postgres daemonizing itself.  If
we were starting fresh, maybe, but there's plenty people invoking
postgres from scripts etc.  And tools like systemd don't actually want
daemons to fork away, so there's no clear need from that side either.


> I'm not sure the several-years-ago LINUX_OOM_ADJ issue (to resolve that,
> silient_mode was removed) still exists or not. I don't have context  about
> that, so
> I conceded to use setsid() even I prefer the deleted silent_mode code.

Yes, the OOM issues are still relevant.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Consistent segfault in complex query
Next
From: Alexander Kuzmenkov
Date:
Subject: Re: Index Skip Scan