pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Unify several ways to tracking backend type
Date: Mon, 16 Mar 2020 16:22:17 -0300
Message-ID: <20200316192217.GA24733@alvherre.pgsql> (raw)
In-Reply-To: <E1jCkMf-0007XE-Pj@gemulon.postgresql.org>

On 2020-Mar-13, Peter Eisentraut wrote:

> Unify several ways to tracking backend type
> 
> Add a new global variable MyBackendType that uses the same BackendType
> enum that was previously only used by the stats collector.  That way
> several duplicate ways of checking what type a particular process is
> can be simplified.  Since it's no longer just for stats, move to
> miscinit.c and rename existing functions to match the expanded
> purpose.

Now that I look at this again, I realize that these backend-type
descriptions are not marked translatable, which is at odds with what we
do with HandlChildCrash, for example.

Now, in addition to plastering _() to the strings, maybe we could use
that new function in postmaster.c, say

                HandleChildCrash(pid, exitstatus,
                                 GetBackendTypeDesc(B_CHECKPOINTER));

and so on.  Same with LogChildExit().  That'd reduce duplication.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (2+ messages)

Message-ID: <20200316192217.GA24733@alvherre.pgsql>
Permalink:  ../20200316192217.GA24733@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200316192217.GA24733@alvherre.pgsql

 · 

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: alvherre@2ndquadrant.com, peter@eisentraut.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Unify several ways to tracking backend type
  In-Reply-To: <20200316192217.GA24733@alvherre.pgsql>
  References: <E1jCkMf-0007XE-Pj@gemulon.postgresql.org> <20200316192217.GA24733@alvherre.pgsql>

* 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