Question 320
Before changing production settings, a reviewer notes: An embeddings API connects to PostgreSQL with sslmode=require but does not verify the expected server hostname. Which evidence best distinguishes the cause?
Explanation
Correct Answer
Inspect libpq SSL mode, CA trust bundle and host name in the connection string. The scenario specifically states: An embeddings API connects to PostgreSQL with sslmode=require but does not verify the expected server hostname. PostgreSQL TLS verification modes differ; verify-full checks trusted CA and hostname. This check looks at the condition that directly distinguishes the described failure. The supported implementation response is Use supported verify-full semantics with the correct trusted server certificate chain. The important remaining qualification is: TLS authentication does not grant PostgreSQL table privileges.
Incorrect Answers
Connection pooling reuses backend database connections and limits concurrency pressure. In the present case the governing issue is PostgreSQL TLS verification modes differ; verify-full checks trusted CA, which this does not resolve.
Read replicas can offload compatible read-heavy queries with replication lag considerations. That observation may hold without resolving the relevant issue: Inspect libpq SSL mode, CA trust bundle and host.
SQL can combine pgvector distance ordering with structured predicates in one query. It does not verify the requested outcome; here the decisive check concerns Inspect libpq SSL mode, CA trust bundle and host.