Re: Taking database offline

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Taking database offline
Дата
Msg-id 200311131620.hADGK0l24065@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Taking database offline  (ow <oneway_111@yahoo.com>)
Список pgsql-admin
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Telecontrol Networking"
Дата:
Сообщение: Re: can't connect to PostgreSQL Database using pgAdminII
Следующее
От: Markus Espenhain
Дата:
Сообщение: SQL-Statement