public inbox for [email protected]
help / color / mirror / Atom feedOut of date advice about SIGTERM'ing backends
2+ messages / 2 participants
[nested] [flat]
* Out of date advice about SIGTERM'ing backends
@ 2012-06-30 03:10 Josh Kupershmidt <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Josh Kupershmidt @ 2012-06-30 03:10 UTC (permalink / raw)
To: pgsql-docs
Hi all,
In the "Notes" section[0] of the postgres command's page, this advice is given:
| The postgres server uses SIGTERM to tell subordinate server
| processes to quit normally and SIGQUIT to terminate without
| the normal cleanup. These signals should not be used by users.
I think now that we've added pg_terminate_backend() and made it
callable by non-superusers, we should relax the caveat against using
SIGTERM against backends. The warning to stay away from using SIGQUIT
seems fine as-is. Patch attached.
Josh
[0] http://www.postgresql.org/docs/9.2/static/app-postgres.html#AEN87192
Attachments:
[application/octet-stream] backends_sigterm.diff (1.8K, 2-backends_sigterm.diff)
download | inline diff:
diff --git a/doc/src/sgml/ref/postgres-ref.sgml b/doc/src/sgml/ref/postgres-ref.sgml
new file mode 100644
index 4e5cd02..a1d014d
*** a/doc/src/sgml/ref/postgres-ref.sgml
--- b/doc/src/sgml/ref/postgres-ref.sgml
*************** PostgreSQL documentation
*** 726,739 ****
<para>
To cancel a running query, send the <literal>SIGINT</literal> signal
! to the process running that command.
</para>
<para>
! The <command>postgres</command> server uses <literal>SIGTERM</literal>
! to tell subordinate server processes 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 server
process — the main <command>postgres</command> process will
interpret this as a crash and will force all the sibling processes
--- 726,743 ----
<para>
To cancel a running query, send the <literal>SIGINT</literal> signal
! to the process running that command. To terminate a backend process
! cleanly, send <literal>SIGTERM</literal> to that process. See
! also <function>pg_cancel_backend</> and <function>pg_terminate_backend</>
! in <xref linkend="functions-admin-signal"> for the SQL-callable equivalents
! of these two actions.
</para>
<para>
! The <command>postgres</command> server uses <literal>SIGQUIT</literal>
! to tell subordinate server processes to terminate without normal
! cleanup.
! This signal <emphasis>should not</emphasis> be used by users. It
is also unwise to send <literal>SIGKILL</literal> to a server
process — the main <command>postgres</command> process will
interpret this as a crash and will force all the sibling processes
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Out of date advice about SIGTERM'ing backends
@ 2012-08-30 21:58 Bruce Momjian <[email protected]>
parent: Josh Kupershmidt <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2012-08-30 21:58 UTC (permalink / raw)
To: Josh Kupershmidt <[email protected]>; +Cc: pgsql-docs
On Fri, Jun 29, 2012 at 08:10:40PM -0700, Josh Kupershmidt wrote:
> Hi all,
>
> In the "Notes" section[0] of the postgres command's page, this advice is given:
>
> | The postgres server uses SIGTERM to tell subordinate server
> | processes to quit normally and SIGQUIT to terminate without
> | the normal cleanup. These signals should not be used by users.
>
> I think now that we've added pg_terminate_backend() and made it
> callable by non-superusers, we should relax the caveat against using
> SIGTERM against backends. The warning to stay away from using SIGQUIT
> seems fine as-is. Patch attached.
Patch applied for 9.3.
---------------------------------------------------------------------------
>
> Josh
>
> [0] http://www.postgresql.org/docs/9.2/static/app-postgres.html#AEN87192
> diff --git a/doc/src/sgml/ref/postgres-ref.sgml b/doc/src/sgml/ref/postgres-ref.sgml
> new file mode 100644
> index 4e5cd02..a1d014d
> *** a/doc/src/sgml/ref/postgres-ref.sgml
> --- b/doc/src/sgml/ref/postgres-ref.sgml
> *************** PostgreSQL documentation
> *** 726,739 ****
>
> <para>
> To cancel a running query, send the <literal>SIGINT</literal> signal
> ! to the process running that command.
> </para>
>
> <para>
> ! The <command>postgres</command> server uses <literal>SIGTERM</literal>
> ! to tell subordinate server processes 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 server
> process — the main <command>postgres</command> process will
> interpret this as a crash and will force all the sibling processes
> --- 726,743 ----
>
> <para>
> To cancel a running query, send the <literal>SIGINT</literal> signal
> ! to the process running that command. To terminate a backend process
> ! cleanly, send <literal>SIGTERM</literal> to that process. See
> ! also <function>pg_cancel_backend</> and <function>pg_terminate_backend</>
> ! in <xref linkend="functions-admin-signal"> for the SQL-callable equivalents
> ! of these two actions.
> </para>
>
> <para>
> ! The <command>postgres</command> server uses <literal>SIGQUIT</literal>
> ! to tell subordinate server processes to terminate without normal
> ! cleanup.
> ! This signal <emphasis>should not</emphasis> be used by users. It
> is also unwise to send <literal>SIGKILL</literal> to a server
> process — the main <command>postgres</command> process will
> interpret this as a crash and will force all the sibling processes
>
> --
> Sent via pgsql-docs mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-docs
--
Bruce Momjian <[email protected]> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-08-30 21:58 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-06-30 03:10 Out of date advice about SIGTERM'ing backends Josh Kupershmidt <[email protected]>
2012-08-30 21:58 ` Bruce Momjian <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox