1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Initial pgindent and pgperltidy run for v14.

Also "make reformat-dat-files".

The only change worthy of note is that pgindent messed up the formatting
of launcher.c's struct LogicalRepWorkerId, which led me to notice that
that struct wasn't used at all anymore, so I just took it out.
This commit is contained in:
Tom Lane
2021-05-12 13:14:10 -04:00
parent e6ccd1ce16
commit def5b065ff
230 changed files with 2408 additions and 2125 deletions

View File

@@ -137,11 +137,12 @@ pg_wait_until_termination(int pid, int64 timeout)
* Wait in steps of waittime milliseconds until this function exits or
* timeout.
*/
int64 waittime = 100;
int64 waittime = 100;
/*
* Initially remaining time is the entire timeout specified by the user.
*/
int64 remainingtime = timeout;
int64 remainingtime = timeout;
/*
* Check existence of the backend. If the backend still exists, then wait
@@ -162,7 +163,7 @@ pg_wait_until_termination(int pid, int64 timeout)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg("could not check the existence of the backend with PID %d: %m",
pid)));
pid)));
}
/* Process interrupts, if any, before waiting */
@@ -198,9 +199,9 @@ pg_wait_until_termination(int pid, int64 timeout)
Datum
pg_terminate_backend(PG_FUNCTION_ARGS)
{
int pid;
int r;
int timeout;
int pid;
int r;
int timeout;
pid = PG_GETARG_INT32(0);
timeout = PG_GETARG_INT64(1);
@@ -208,7 +209,7 @@ pg_terminate_backend(PG_FUNCTION_ARGS)
if (timeout < 0)
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("\"timeout\" must not be negative")));
errmsg("\"timeout\" must not be negative")));
r = pg_signal_backend(pid, SIGTERM);
@@ -240,9 +241,9 @@ pg_terminate_backend(PG_FUNCTION_ARGS)
Datum
pg_wait_for_backend_termination(PG_FUNCTION_ARGS)
{
int pid;
int64 timeout;
PGPROC *proc = NULL;
int pid;
int64 timeout;
PGPROC *proc = NULL;
pid = PG_GETARG_INT32(0);
timeout = PG_GETARG_INT64(1);
@@ -250,7 +251,7 @@ pg_wait_for_backend_termination(PG_FUNCTION_ARGS)
if (timeout <= 0)
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("\"timeout\" must not be negative or zero")));
errmsg("\"timeout\" must not be negative or zero")));
proc = BackendPidGetProc(pid);