How to get DB connection PID from JDBC - Mailing list pgsql-jdbc

From Oleg Golovanov
Subject How to get DB connection PID from JDBC
Date
Msg-id 1662974029.147588580@f112.i.mail.ru
Whole thread Raw
Responses Re: How to get DB connection PID from JDBC
List pgsql-jdbc
Hello
 
There was a need for logging purposes to receive in a Java / Spring application using JDBC, the PID of the connection on the database side. I did not find such an opportunity in the JDBC sources.
 
Can you explain if there is such a possibility?
 
It seems to me to execute when establishing a connection each time a request
select pg_backend_pid()
not the best idea.
 
Best Regards,

Oleg Golovanov
Tel./WhatsApp +79067778133
Moscow, Russia
 

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Postgresql JDBC process consumes more memory with partition tables update delete
Next
From: Jorge Solórzano
Date:
Subject: Re: How to get DB connection PID from JDBC