Re: Debugging features needed

From: Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com>
To: Boboc Cristi <bobocc(at)yahoo(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>, pgsql-general-owner(at)lists(dot)postgresql(dot)org
Subject: Re: Debugging features needed
Date: 2021-11-05 11:41:40
Message-ID: CAM+6J96843ZRSKvYMZPD05AqT=XMPoncHOcsMKqLA4G7OsNvog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Nov 5, 2021, 4:58 PM Boboc Cristi <bobocc(at)yahoo(dot)com> wrote:

> Hello!
> I need a feature that would me allow to debug "live" the work of an
> application together with a PostgreSQL database.
>
> I think that if I would be able to define a session variable that is
> visible in pg_stat_activity (or in other system view, table or function) I
> would be more than happy.
>
> Well, I have described what I see as a partial solution to my problem, the
> problem being: how to track a specific set of actions at database level of
> a given application user in the context of session pooling (so the user
> activity can jump from one session to another of the same pool).
>
> If I would be able to set a "value" to a custom variable, then the app
> would simply need to set the value at each session usage, but I definitely
> understand that other mechanisms might help solving the problem (but I do
> not know any of these).
>

I had been trying something similar to play with tracing. I was wondering
if the traceid or requestid could make its way into the query logs to be
able to debug.
The only thing I could find was play around with param application_name
that could be set for each session with the traceid of my downstream and
enable logging to log application name via log_line_prefix.

I'll be interested to know as well if there are any other parameters.

https://www.enterprisedb.com/blog/getting-most-out-applicationname

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Boboc Cristi 2021-11-05 11:49:28 Re: Debugging features needed
Previous Message Boboc Cristi 2021-11-05 11:28:21 Debugging features needed