ow wrote:
>
> --- Bruce Momjian <pgman@candle.pha.pa.us> wrote:
> > No, I guess that is the problem. You can use restart, which will kick
> > everyone out, or you can use reload, but that doesn't kick people out of
> > the single database you want.
> >
>
> Restarting the db server triggers the whole chain of events: other dbs are
> affected, app servers will also need to restarted, and that has to be done
> twice (change pg_hba.conf and then reverse). There's got to be a better way.
OK, use reload, then use 'ps' to see the people connected to the
database and send a signal to the backend to for it to exit --- this is
how the postmaster does it.
Signals to use from the 7.4 postgres manual:
<para>
The <command>postmaster</command> uses <literal>SIGTERM</literal>
to tell a <command>postgres</command> process to quit normally and
<literal>SIGQUIT</literal> to terminate without the normal cleanup.
These signals <emphasis>should not</emphasis> be used by users. It is also
unwise to send <literal>SIGKILL</literal> to a <command>postgres</command>
process --- the <command>postmaster</command> will interpret this as
a crash in <command>postgres</command>, and will force all the sibling
<command>postgres</command> processes to quit as part of its standard
crash-recovery procedure.
</para>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073