Re: Killing a session in windows

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Killing a session in windows
Дата
Msg-id 200712220244.lBM2icf00697@momjian.us
обсуждение исходный текст
Ответ на Re: Killing a session in windows  (Howard Cole <howardnews@selestial.com>)
Список pgsql-general
Howard Cole wrote:
> > Wow, yea, I see that now, but it is alone a paragraph above.  I updated
> > the text to:
> >
> >    The <xref linkend="app-pg-ctl"> program provides a convenient
> >    interface for sending these signals to shut down the server.
> >    Alternatively, you can send the signal directly using
> >    <command>kill</> on non-Windows systems.
> >
> >
> My documentation point is that in administering the service, I cannot
> drop a database if there is still an active connection. To drop a
> process in linux appears to be easy using "kill", but this does not seem
> to be the case in windows using taskkill. I would rather see some
> reference to killing rogue connections using pg_ctl in the "Managing
> Databases" chapter, and reference to it in "Destroying a Database" and
> "DROP DATABASE" documentation because this would be where I would first
> search for a solution when I had the problem.

Uh, well we have this TODO:

    * Allow administrators to safely terminate individual sessions either
      via an SQL function or SIGTERM

      Lock table corruption following SIGTERM of an individual backend
      has been reported in 8.0.  A possible cause was fixed in 8.1, but
      it is unknown whether other problems exist.  This item mostly
      requires additional testing rather than of writing any new code.

      http://archives.postgresql.org/pgsql-hackers/2006-08/msg00174.php

so I am unsure how we would give such a capability on Windows when we
don't support it on Unix either.

> In the pg_ctl documentation, I would recommend explicitly stating that
> "pg_ctl kill -TERM pid" can be used to kill individual connections to a
> database in windows, because "taskkill" and "select pg_cancel_backend()"
> do not seem to always work (for me anyway) in windows. Also HUP and

Where do we say that about Unix in the pg_ctl manual?

> other signals mean nothing to a windows user.

We actually simulate these signals on Windows, so the pg_ctl kill
actually works just like Unix.  We do have in the pg_ctl manual:

   <option>kill</option> mode allows you to send a signal to a specified
    process.  This is particularly valuable for <productname>Microsoft Windows</>
    which does not have a <application>kill</> command.  Use
    <literal>--help</> to see a list of supported signal names.

Is that unclear?

> In general the documentation, understandably, is geared toward *nix, I
> do not know what proportion of installations are Windows, but I suspect
> they are growing at a rapid rate since version 8. Postgres on Windows is
> a fabulous product, and the migration to the windows platform has been
> much cleaner than the migration of Mysql, so it would be a shame to lose
> market share on the basis that the documentation still has sections
> biased towards *nix. Removal of *nix-isms from the main strand of the
> documentation and additions of clearly marked build dependant comments
> where appropriate would make a big difference in uniting the world! So
> for example, the documentation for pg_ctl would have a description and
> common options, and then list any linux/bsd/unix/windows differences in
> section similar to the User Comments sections of the documentation.

Can you give a specific example?  As I said we simulate Windows so it
should act just like Unix.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Setting Sequence Values
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Setting Sequence Values