Re: backend type in log_line_prefix?

2020-04-01 Thread Peter Eisentraut
On 2020-04-01 03:55, Bruce Momjian wrote: Agreed. I ended up moving "wal" as a separate word, since it looks cleaner; patch attached. Tools that look for the backend type in pg_stat_activity would need to be adjusted; it would be an incompatibility. Maybe changing it would cause too much

Re: backend type in log_line_prefix?

2020-03-31 Thread Bruce Momjian
On Fri, Mar 27, 2020 at 04:30:07PM +0900, Kyotaro Horiguchi wrote: > Hello. > > At Mon, 23 Mar 2020 18:38:53 -0400, Bruce Momjian wrote in > > Patch applied to master, thanks. > > The patch (8e8a0becb3) named archiver process as just "archiver". On > the other hand the discussion in the

Re: backend type in log_line_prefix?

2020-03-27 Thread Kyotaro Horiguchi
Hello. At Mon, 23 Mar 2020 18:38:53 -0400, Bruce Momjian wrote in > Patch applied to master, thanks. The patch (8e8a0becb3) named archiver process as just "archiver". On the other hand the discussion in the thread [1] was going to name the process as "WAL/wal archiver". As all other

Re: backend type in log_line_prefix?

2020-03-23 Thread Bruce Momjian
On Thu, Mar 19, 2020 at 01:37:17PM -0300, Fabrízio de Royes Mello wrote: > > On Sun, Mar 15, 2020 at 7:32 AM Peter Eisentraut < > peter.eisentr...@2ndquadrant.com> wrote: > > > > > > I have committed that last one also, after some corrections. > > > > IMHO we should also update file_fdw

Re: backend type in log_line_prefix?

2020-03-19 Thread Fabrízio de Royes Mello
On Sun, Mar 15, 2020 at 7:32 AM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > > > I have committed that last one also, after some corrections. > IMHO we should also update file_fdw documentation. See attached! Regards, -- Fabrízio de Royes Mello Timbira -

Re: backend type in log_line_prefix?

2020-03-17 Thread Mike Palmiotto
> On 2020/03/15 19:32, Peter Eisentraut wrote: > > On 2020-03-13 22:24, Peter Eisentraut wrote: > >> On 2020-03-10 19:07, Alvaro Herrera wrote: > >>> I like these patches; the first two are nice cleanup. > >>> > >>> My only gripe is that pgstat_get_backend_desc() is not really a pgstat > >>>

Re: backend type in log_line_prefix?

2020-03-15 Thread Fujii Masao
On 2020/03/15 19:32, Peter Eisentraut wrote: On 2020-03-13 22:24, Peter Eisentraut wrote: On 2020-03-10 19:07, Alvaro Herrera wrote: I like these patches; the first two are nice cleanup. My only gripe is that pgstat_get_backend_desc() is not really a pgstat function; I think it should have

Re: backend type in log_line_prefix?

2020-03-15 Thread Peter Eisentraut
On 2020-03-15 10:57, Justin Pryzby wrote: I suggest the CSV/log should also have the leader_pid, corresponding to | b025f32e0b Add leader_pid to pg_stat_activity I haven't followed those developments. It sounds interesting, but I suggest you start a new thread or continue in the thread that

Re: backend type in log_line_prefix?

2020-03-15 Thread Peter Eisentraut
On 2020-03-13 22:24, Peter Eisentraut wrote: On 2020-03-10 19:07, Alvaro Herrera wrote: I like these patches; the first two are nice cleanup. My only gripe is that pgstat_get_backend_desc() is not really a pgstat function; I think it should have a different name with a prototype in miscadmin.h

Re: backend type in log_line_prefix?

2020-03-15 Thread Justin Pryzby
On Fri, Mar 13, 2020 at 10:22:52PM +0100, Peter Eisentraut wrote: > >Can I suggest: > > > >- appendCSVLiteral(, MyBgworkerEntry->bgw_type); > >+ appendCSVLiteral(, MyBgworkerEntry->bgw_name); > > The difference is intentional. bgw_type is so that you can filter and

Re: backend type in log_line_prefix?

2020-03-14 Thread Justin Pryzby
On Fri, Feb 21, 2020 at 10:09:38AM +0100, Peter Eisentraut wrote: > From 75ac8ed0c47801712eb2aa300d9cb29767d2e121 Mon Sep 17 00:00:00 2001 > From: Peter Eisentraut > Date: Thu, 20 Feb 2020 18:16:39 +0100 > Subject: [PATCH v2 3/4] Add backend type to csvlog and optionally > log_line_prefix >

Re: backend type in log_line_prefix?

2020-03-13 Thread Peter Eisentraut
On 2020-03-10 19:07, Alvaro Herrera wrote: I like these patches; the first two are nice cleanup. My only gripe is that pgstat_get_backend_desc() is not really a pgstat function; I think it should have a different name with a prototype in miscadmin.h (next to the enum's new location, which I

Re: backend type in log_line_prefix?

2020-03-13 Thread Peter Eisentraut
On 2020-03-11 19:53, Justin Pryzby wrote: Can I suggest: $ git diff diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 3a6f7f9456..56e0a1437e 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -2945,7 +2945,7 @@

Re: backend type in log_line_prefix?

2020-03-11 Thread Justin Pryzby
On Tue, Mar 10, 2020 at 02:01:42PM -0500, Justin Pryzby wrote: > On Thu, Feb 13, 2020 at 06:43:32PM +0900, Fujii Masao wrote: > > If we do this, backend type should be also included in csvlog? > > +1, I've been missing that > > Note, this patch seems to correspond to: > b025f32e0b Add leader_pid

Re: backend type in log_line_prefix?

2020-03-10 Thread Justin Pryzby
On Thu, Feb 13, 2020 at 06:43:32PM +0900, Fujii Masao wrote: > If we do this, backend type should be also included in csvlog? +1, I've been missing that Note, this patch seems to correspond to: b025f32e0b Add leader_pid to pg_stat_activity I had mentioned privately to Julien missing this info

Re: backend type in log_line_prefix?

2020-03-10 Thread Alvaro Herrera
I like these patches; the first two are nice cleanup. My only gripe is that pgstat_get_backend_desc() is not really a pgstat function; I think it should have a different name with a prototype in miscadmin.h (next to the enum's new location, which I would put someplace near the "pmod.h" comment

Re: backend type in log_line_prefix?

2020-03-10 Thread Kuntal Ghosh
On Tue, Mar 10, 2020 at 9:11 PM Peter Eisentraut wrote: > On 2020-03-09 16:20, Kuntal Ghosh wrote: > > In v3-0001-Refactor-ps_status.c-API.patch, > > - * postgres: walsender > > This part is still valid, right? > Sure but I figured this comment was in the context of the explanation of > how

Re: backend type in log_line_prefix?

2020-03-10 Thread Julien Rouhaud
On Tue, Mar 10, 2020 at 4:41 PM Peter Eisentraut wrote: > > On 2020-03-09 16:20, Kuntal Ghosh wrote: > > In v3-0002-Unify-several-ways-to-tracking-backend-type.patch, In pgstat_get_backend_desc(), the fallback "unknown process type" description shouldn't be required anymore. Other than that, it

Re: backend type in log_line_prefix?

2020-03-10 Thread Peter Eisentraut
On 2020-03-09 16:20, Kuntal Ghosh wrote: In v3-0001-Refactor-ps_status.c-API.patch, - * - * For a walsender, the ps display is set in the following form: - * - * postgres: walsender This part is still valid, right? Sure but I figured this comment was in the context of the explanation of

Re: backend type in log_line_prefix?

2020-03-09 Thread Kuntal Ghosh
Hello, On Sat, Mar 7, 2020 at 8:38 PM Peter Eisentraut wrote: > > Updated patch set because of conflicts. > Thank you for the patch. This feature is really helpful. Here are some minor comments: In v3-0001-Refactor-ps_status.c-API.patch, - * - * For a walsender, the ps display is set in the

Re: backend type in log_line_prefix?

2020-03-07 Thread Peter Eisentraut
Updated patch set because of conflicts. On 2020-02-21 10:09, Peter Eisentraut wrote: After positive initial feedback, here is a more ambitious patch set. In particular, I wanted to avoid having to specify the backend type (at least) twice, once for the ps display and once for this new

Re: backend type in log_line_prefix?

2020-02-21 Thread Peter Eisentraut
On 2020-02-13 09:56, Peter Eisentraut wrote: Attached is a demo patch that adds a placeholder %b for log_line_prefix (not in the default setting) that contains the backend type, the same that you see in pg_stat_activity and in the ps status. I would have found this occasionally useful when

Re: backend type in log_line_prefix?

2020-02-19 Thread Andres Freund
Hi, On 2020-02-13 09:56:38 +0100, Peter Eisentraut wrote: > Attached is a demo patch that adds a placeholder %b for log_line_prefix (not > in the default setting) that contains the backend type, the same that you > see in pg_stat_activity and in the ps status. I would have found this >

Re: backend type in log_line_prefix?

2020-02-13 Thread Fujii Masao
On 2020/02/13 18:14, Julien Rouhaud wrote: On Thu, Feb 13, 2020 at 09:56:38AM +0100, Peter Eisentraut wrote: Attached is a demo patch that adds a placeholder %b for log_line_prefix (not in the default setting) that contains the backend type, the same that you see in pg_stat_activity and in

Re: backend type in log_line_prefix?

2020-02-13 Thread Julien Rouhaud
On Thu, Feb 13, 2020 at 09:56:38AM +0100, Peter Eisentraut wrote: > Attached is a demo patch that adds a placeholder %b for log_line_prefix (not > in the default setting) that contains the backend type, the same that you > see in pg_stat_activity and in the ps status. I would have found this >

backend type in log_line_prefix?

2020-02-13 Thread Peter Eisentraut
4:29 +0100 Subject: [PATCH] Add backend type placeholder to log_line_prefix --- doc/src/sgml/config.sgml| 5 + src/backend/bootstrap/bootstrap.c | 2 +- src/backend/postmaster/autovacuum.c | 4 ++-- src/backend/postmaster/bgworker.c | 2 +- src/backend/postmaster/pgarch.c