pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Boboc Cristi <bobocc@yahoo.com>
To: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Cc: pgsql-general-owner@lists.postgresql.org <pgsql-general-owner@lists.postgresql.org>
Subject: Re: Debugging features needed
Date: Fri, 5 Nov 2021 11:49:28 +0000 (UTC)
Message-ID: <1612433123.812776.1636112968963@mail.yahoo.com> (raw)
In-Reply-To: <CAM+6J96843ZRSKvYMZPD05AqT=XMPoncHOcsMKqLA4G7OsNvog@mail.gmail.com>
References: <1395901381.802146.1636111701121.ref@mail.yahoo.com>
	<1395901381.802146.1636111701121@mail.yahoo.com>
	<CAM+6J96843ZRSKvYMZPD05AqT=XMPoncHOcsMKqLA4G7OsNvog@mail.gmail.com>

    Thank you, Sir!
It is, indeed, a good idea!
Best regards, Cristi Boboc 

    On Friday, November 5, 2021, 01:41:52 PM GMT+2, Vijaykumar Jain <vijaykumarjain.github@gmail.com> wrote:  
 
 

On Fri, Nov 5, 2021, 4:58 PM Boboc Cristi <bobocc@yahoo.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  

view thread (8+ messages)  latest in thread

Message-ID: <1612433123.812776.1636112968963@mail.yahoo.com>
Permalink:  ../1612433123.812776.1636112968963@mail.yahoo.com/
Also on:    postgresql.org/message-id/1612433123.812776.1636112968963@mail.yahoo.com

 · 

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-general@postgresql.org
  Cc: bobocc@yahoo.com, vijaykumarjain.github@gmail.com, pgsql-general-owner@lists.postgresql.org
  Subject: Re: Debugging features needed
  In-Reply-To: <1612433123.812776.1636112968963@mail.yahoo.com>
  References: <1395901381.802146.1636111701121.ref@mail.yahoo.com> <1395901381.802146.1636111701121@mail.yahoo.com> <CAM+6J96843ZRSKvYMZPD05AqT=XMPoncHOcsMKqLA4G7OsNvog@mail.gmail.com> <1612433123.812776.1636112968963@mail.yahoo.com>

* 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