pg_variables icon indicating copy to clipboard operation
pg_variables copied to clipboard

Automatic cleanup of transactional variables

Open vitalca opened this issue 3 years ago • 1 comments

Hello,

I use the extension in order to set up the current app security context for audit triggers. There is a connection pooler, working in the transaction pooling mode, meaning that the same DB session (including pg vars data) can be shared between different JDBC connections.

I'd like a transactional variable to be automatically cleaned up at the end of each transaction. Any ideas on how to do this?

vitalca avatar Dec 22 '22 15:12 vitalca

I suppose I should stick to the standard functions set_config() / current_setting() rather than using the extension to achieve the desired behavior.

vitalca avatar Dec 23 '22 16:12 vitalca