Re: [Patch] Create a new session in postmaster by calling setsid()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, Paul Guo <pguo(at)pivotal(dot)io>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Patch] Create a new session in postmaster by calling setsid()
Date: 2018-12-28 20:13:34
Message-ID: 16816.1546028014@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> We talked about adding a flag to postmaster, to tell it to call
> setsid(). But I'm not sure what would be the appropriate time to do it.

Yeah, there's no ideal time in the postmaster.

> Another idea would be to call setsid() in pg_ctl, after forking
> postmaster, like in Paul's original patch. That solves 1. and 2. To
> still do 3., add a signal handler for SIGINT in pg_ctl, which forwards
> the SIGINT to the postmaster process. Thoughts on that?

That seems like a nice idea.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mitar 2018-12-28 20:49:08 Regression tests using multiple sessions
Previous Message Dimitri Fontaine 2018-12-28 19:32:15 Re: Prepare Transaction support for ON COMMIT DROP temporary tables