From: | Andrey Mosienko <feo(at)feo(dot)org(dot)ru> |
---|---|
To: | Postgres <pgsql-general(at)postgresql(dot)org> |
Subject: | Detaching from controlling terminal |
Date: | 2003-11-18 05:38:23 |
Message-ID: | 3FB9B04F.47188F8@feo.org.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
We are using PostgreSQL about two years beginning from version 7.0.
I have one question about starting postmaster:
Is there way to detach it from the controlling terminal under FreeBSD?
My situation: I start postmaster manually:
su pgsql -c "/usr/local/pgsql/bin/pg_ctl
-D /usr/local/pgsql/data -l /usr/local/pgsql/log/pgsql.log start"
Log:
[1] LOG: database system was shut down at 2003-11-18 08:28:48 MSK
[2] LOG: checkpoint record is at 2/781889D0
[3] LOG: redo record is at 2/781889D0; undo record is at 0/0; shutdown TRUE
[4] LOG: next transaction id: 45635; next oid: 32885093
[5] LOG: database system is ready
and I see:
9655 p1 S+ 0:00,01 /usr/local/pgsql/bin/postmaster (postgres)
9657 p1 S+ 0:00,00 postmaster: stats buffer process (postgres)
9658 p1 S+ 0:00,00 postmaster: stats collector process (postgres)
It is attached to console p1. So when I press Ctrl+C in this console
postmaster writes and exits:
Log:
[1] LOG: fast shutdown request
[2] LOG: shutting down
[3] LOG: database system is shut down
When I reload server postmaster starts without any controlling terminal
and I can press Ctrl+C in any console I want:
178 con- I+ 0:00,16 /usr/local/pgsql/bin/postmaster (postgres)
180 con- I+ 0:00,00 postmaster: stats buffer process (postgres)
181 con- I+ 0:00,00 postmaster: stats collector process (postgres)
So I repeat my question:
Is there way to detach it from the controlling terminal under FreeBSD?
--
Best regards Andrey Feofilactovich.
From | Date | Subject | |
---|---|---|---|
Next Message | Shridhar Daithankar | 2003-11-18 05:58:22 | Re: Move a table to another schema |
Previous Message | Elliott Reyes Aguilar | 2003-11-18 04:25:43 | Trouble with pg files for Kontor 13 |