Access session level local params from another transaction by process id (PID) - Mailing list pgsql-general

From Stanislav Mudrinski
Subject Access session level local params from another transaction by process id (PID)
Date
Msg-id f446598e-99e6-e0e4-0d66-f129200a06b5@navigator.rs
Whole thread Raw
List pgsql-general

Hi,

I have a question regarding session params. We are using them thru SET LOCAL call request when connection is popped from pool to set, for example userId or API call route for current transaction so that any stored procedure can fetch them, if needed.

This reduces number of params for every stored procedure call.

In order to debug system locks, we want to access those values. I have found an idea  on https://wiki.postgresql.org/wiki/Lock_Monitoring to use

SET application_name='%application_name_plus_additional_params%'
to be able to acces those data when we have system locks, but that adds anotner call on every transaction.
Is it somehow possible to access session level configuration data for specific PID from another transaction?


Kind regards,

Stanislav

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Missing rows after migrating from postgres 11 to 12 with logical replication
Next
From: Gustavsson Mikael
Date:
Subject: SV: SV: SV: SV: Problem with ssl and psql in Postgresql 13