From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Unify several ways to tracking backend type |
Date: | 2020-03-16 19:22:17 |
Message-ID: | 20200316192217.GA24733@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2020-03-16 19:29:25 | pgsql: Plug memory leak |
Previous Message | Peter Geoghegan | 2020-03-16 19:00:42 | pgsql: nbtree: Pass down MAXALIGN()'d itemsz for new item. |
From | Date | Subject | |
---|---|---|---|
Next Message | legrand legrand | 2020-03-16 19:44:14 | Re: Planning counters in pg_stat_statements (using pgss_store) |
Previous Message | Andres Freund | 2020-03-16 18:57:02 | Re: Berserk Autovacuum (let's save next Mandrill) |