Re: pgsql: Unify several ways to tracking backend type

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pgsql: Unify several ways to tracking backend type
Дата
Msg-id 20200316192217.GA24733@alvherre.pgsql
обсуждение исходный текст
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Berserk Autovacuum (let's save next Mandrill)
Следующее
От: legrand legrand
Дата:
Сообщение: Re: Planning counters in pg_stat_statements (using pgss_store)