1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Remove pg_wait_for_backend_termination().

It was unable to wait on a backend that had already left the procarray.
Users tolerant of that limitation can poll pg_stat_activity.  Other
users can employ the "timeout" argument of pg_terminate_backend().

Reviewed by Bharath Rupireddy.

Discussion: https://postgr.es/m/20210605013236.GA208701@rfd.leadboat.com
This commit is contained in:
Noah Misch
2021-06-14 17:29:37 -07:00
parent 0aac73e6a2
commit 5f1df62a45
6 changed files with 2 additions and 70 deletions

View File

@ -25002,23 +25002,6 @@ SELECT collation for ('foo' COLLATE "de_DE");
<literal>false</literal> is returned.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>pg_wait_for_backend_termination</primary>
</indexterm>
<function>pg_wait_for_backend_termination</function> ( <parameter>pid</parameter> <type>integer</type>, <parameter>timeout</parameter> <type>bigint</type> <literal>DEFAULT</literal> <literal>5000</literal> )
<returnvalue>boolean</returnvalue>
</para>
<para>
Waits for the backend process with the specified Process ID to
terminate. If the process terminates before
the <parameter>timeout</parameter> (in milliseconds)
expires, <literal>true</literal> is returned. On timeout, a warning
is emitted and <literal>false</literal> is returned.
</para></entry>
</row>
</tbody>
</tgroup>
</table>

View File

@ -640,13 +640,7 @@ Author: Magnus Hagander <magnus@hagander.net>
-->
<para>
Add function <link
linkend="functions-admin-signal"><function>pg_wait_for_backend_termination()</function></link>
that waits for session exit (Bharath Rupireddy)
</para>
<para>
Also add a similar optional wait parameter to <link
Add an optional timeout parameter to <link
linkend="functions-admin-signal"><function>pg_terminate_backend()</function></link>
</para>
</listitem>