Skip to content

Commit 0aac73e

Browse files
committed
Copy-edit text for the pg_terminate_backend() "timeout" parameter.
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
1 parent 33c5099 commit 0aac73e

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

doc/src/sgml/func.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24998,7 +24998,7 @@ SELECT collation for ('foo' COLLATE "de_DE");
2499824998
milliseconds) and greater than zero, the function waits until the
2499924999
process is actually terminated or until the given time has passed. If
2500025000
the process is terminated, the function
25001-
returns <literal>true</literal>. On timeout a warning is emitted and
25001+
returns <literal>true</literal>. On timeout, a warning is emitted and
2500225002
<literal>false</literal> is returned.
2500325003
</para></entry>
2500425004
</row>

src/backend/storage/ipc/signalfuncs.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ pg_wait_until_termination(int pid, int64 timeout)
187187
}
188188

189189
/*
190-
* Signal to terminate a backend process. This is allowed if you are a member
191-
* of the role whose process is being terminated. If timeout input argument is
192-
* 0 (which is default), then this function just signals the backend and
193-
* doesn't wait. Otherwise it waits until given the timeout milliseconds or no
194-
* process has the given PID and returns true. On timeout, a warning is emitted
195-
* and false is returned.
190+
* Send a signal to terminate a backend process. This is allowed if you are a
191+
* member of the role whose process is being terminated. If the timeout input
192+
* argument is 0, then this function just signals the backend and returns
193+
* true. If timeout is nonzero, then it waits until no process has the given
194+
* PID; if the process ends within the timeout, true is returned, and if the
195+
* timeout is exceeded, a warning is emitted and false is returned.
196196
*
197197
* Note that only superusers can signal superuser-owned processes.
198198
*/
@@ -201,7 +201,7 @@ pg_terminate_backend(PG_FUNCTION_ARGS)
201201
{
202202
int pid;
203203
int r;
204-
int timeout;
204+
int timeout; /* milliseconds */
205205

206206
pid = PG_GETARG_INT32(0);
207207
timeout = PG_GETARG_INT64(1);

src/include/catalog/pg_proc.dat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6186,8 +6186,7 @@
61866186
{ oid => '2171', descr => 'cancel a server process\' current query',
61876187
proname => 'pg_cancel_backend', provolatile => 'v', prorettype => 'bool',
61886188
proargtypes => 'int4', prosrc => 'pg_cancel_backend' },
6189-
{ oid => '2096',
6190-
descr => 'terminate a backend process and if timeout is specified, wait for its exit or until timeout occurs',
6189+
{ oid => '2096', descr => 'terminate a server process',
61916190
proname => 'pg_terminate_backend', provolatile => 'v', prorettype => 'bool',
61926191
proargtypes => 'int4 int8', proargnames => '{pid,timeout}',
61936192
prosrc => 'pg_terminate_backend' },

0 commit comments

Comments
 (0)