Thread: Access session level local params from another transaction by process id (PID)

Access session level local params from another transaction by process id (PID)

From
Stanislav Mudrinski
Date:

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