How to find SSL root cert that made connection to the database in PostgreSQL?
If you use ssl-mode=verify-full, then the server certificate is always tested against the root certificate you pass to the client. So the mere fact that the connection was established successfully is proof that your root certificate has been used.