Re: A new function to wait for the backend exit after termination
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Muhammad Usama <m.usama@gmail.com>
Date: 2020-12-03T02:01:34Z
Lists: pgsql-hackers
"Hou, Zhijie" <houzj.fnst@cn.fujitsu.com> writes:
> + ereport(WARNING,
> + (errmsg("could not wait for the termination of the backend with PID %d within %ld milliseconds",
> + pid, timeout)));
> The code use %ld to print int64 type.
> How about use INT64_FORMAT, which looks more appropriate.
This is a translatable message, so INT64_FORMAT is no good -- we need
something that is the same across platforms. The current project standard
for this problem is to use "%lld" and explicitly cast the argument to long
long int to match that.
regards, tom lane
Commits
-
Copy-edit text for the pg_terminate_backend() "timeout" parameter.
- 0aac73e6a260 14.0 landed
-
Remove pg_wait_for_backend_termination().
- 5f1df62a459b 14.0 landed
-
Add functions to wait for backend termination
- aaf043257205 14.0 landed
-
Fix typo in comment.
- 6742e14959a3 14.0 cited