pg_variables
pg_variables copied to clipboard
Automatic cleanup of transactional variables
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?
I suppose I should stick to the standard functions set_config() / current_setting() rather than using the extension to achieve the desired behavior.