pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Standardize format for printing PIDs
Date: Fri, 14 Oct 2022 06:49:42 +0000
Message-ID: <E1ojEVq-002Ino-0v@gemulon.postgresql.org> (raw)

Standardize format for printing PIDs

Most code prints PIDs as %d, but some code tried to print them as long
or unsigned long.  While this is in theory allowed, the fact that PIDs
fit into int is deeply baked into all PostgreSQL code, so these random
deviations don't accomplish anything except confusion.

Note that we still need casts from pid_t to int, because on 64-bit
MinGW, pid_t is long long int.  (But per above, actually supporting
that range in PostgreSQL code would be major surgery and probably not
useful.)

Discussion: https://www.postgresql.org/message-id/289c2e45-c7d9-5ce4-7eff-a9e2a33e1580@enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1b11561cc1de7596f6f7cb750743af94b9d168f7

Modified Files
--------------
contrib/pg_prewarm/autoprewarm.c     | 20 ++++++++++----------
src/backend/postmaster/bgworker.c    |  4 ++--
src/backend/storage/ipc/procsignal.c |  4 ++--
3 files changed, 14 insertions(+), 14 deletions(-)



Message-ID: <E1ojEVq-002Ino-0v@gemulon.postgresql.org>
Permalink:  ../E1ojEVq-002Ino-0v@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ojEVq-002Ino-0v@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Standardize format for printing PIDs
  In-Reply-To: <E1ojEVq-002Ino-0v@gemulon.postgresql.org>
  References: <E1ojEVq-002Ino-0v@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox