Copy-edit text for the pg_terminate_backend() "timeout" parameter.
authorNoah Misch <noah@leadboat.com>
Tue, 15 Jun 2021 00:29:37 +0000 (17:29 -0700)
committerNoah Misch <noah@leadboat.com>
Tue, 15 Jun 2021 00:29:37 +0000 (17:29 -0700)
Revert the pg_description entry to its v13 form, since those messages
usually remain shorter and don't discuss individual parameters.  No
catversion bump, since pg_description content does not impair backend
compatibility or application compatibility.

Justin Pryzby

Discussion: https://postgr.es/m/20210612182743.GY16435@telsasoft.com

doc/src/sgml/func.sgml
src/backend/storage/ipc/signalfuncs.c
src/include/catalog/pg_proc.dat

index fbc80c1403db1b16d47c447e0a0dc6e7657a8271..b7383bc8aa218c43c73eddb05e0db3b2acb4f8a9 100644 (file)
@@ -24998,7 +24998,7 @@ SELECT collation for ('foo' COLLATE "de_DE");
         milliseconds) and greater than zero, the function waits until the
         process is actually terminated or until the given time has passed. If
         the process is terminated, the function
-        returns <literal>true</literal>.  On timeout a warning is emitted and
+        returns <literal>true</literal>.  On timeout, a warning is emitted and
         <literal>false</literal> is returned.
        </para></entry>
       </row>
index 837699481ca7d4c34ce6744eb19a050784659e72..0a111ad6daa983e8b95cf6f6f3f84a3388a73387 100644 (file)
@@ -187,12 +187,12 @@ pg_wait_until_termination(int pid, int64 timeout)
 }
 
 /*
- * Signal to terminate a backend process. This is allowed if you are a member
- * of the role whose process is being terminated. If timeout input argument is
- * 0 (which is default), then this function just signals the backend and
- * doesn't wait. Otherwise it waits until given the timeout milliseconds or no
- * process has the given PID and returns true. On timeout, a warning is emitted
- * and false is returned.
+ * Send a signal to terminate a backend process. This is allowed if you are a
+ * member of the role whose process is being terminated. If the timeout input
+ * argument is 0, then this function just signals the backend and returns
+ * true.  If timeout is nonzero, then it waits until no process has the given
+ * PID; if the process ends within the timeout, true is returned, and if the
+ * timeout is exceeded, a warning is emitted and false is returned.
  *
  * Note that only superusers can signal superuser-owned processes.
  */
@@ -201,7 +201,7 @@ pg_terminate_backend(PG_FUNCTION_ARGS)
 {
        int                     pid;
        int                     r;
-       int                     timeout;
+       int                     timeout;                /* milliseconds */
 
        pid = PG_GETARG_INT32(0);
        timeout = PG_GETARG_INT64(1);
index acbcae46070c4bcc0932fbbe683fd65633be6cd6..83eea85cf64a5dcc15ee7379cdf779e1abae3cba 100644 (file)
 { oid => '2171', descr => 'cancel a server process\' current query',
   proname => 'pg_cancel_backend', provolatile => 'v', prorettype => 'bool',
   proargtypes => 'int4', prosrc => 'pg_cancel_backend' },
-{ oid => '2096',
-  descr => 'terminate a backend process and if timeout is specified, wait for its exit or until timeout occurs',
+{ oid => '2096', descr => 'terminate a server process',
   proname => 'pg_terminate_backend', provolatile => 'v', prorettype => 'bool',
   proargtypes => 'int4 int8', proargnames => '{pid,timeout}',
   prosrc => 'pg_terminate_backend' },