libpq.dll Error in Windows 10 and 11: PostgreSQL client startup errors

A desktop database client fails before it can begin a connection, or the error dialog names libpq.dll after a client update.
What this DLL does
libpq is PostgreSQL’s native C client library. Many Windows applications ship it privately to make PostgreSQL connections.
Start with this check
Check whether the program owns the DLL in its installation folder and see if other PostgreSQL tools on the same PC still open. Record the application and its supported client version.
Record the exact error, when it occurred, and the full module path if available. For a crash, open View reliability history from Start and look for the matching entry. The affected app, faulting module and exception code help distinguish an app problem from a system-wide one.
A login error after the client initializes points to a different stage. Keep the connection settings unchanged while testing library loading.
Choose the repair that fits
Repair the program with its official installer. For a self-managed PostgreSQL client installation, restore the supported client package and its matching SSL dependencies.
Start with Microsoft’s app repair options if only one supported application fails. If unrelated built-in Windows features also fail and you suspect system file corruption, use Microsoft’s DISM and System File Checker instructions. Use supported packages and avoid downloading individual DLL files.
Verify the repair
Run the app’s connection test with an approved test database and execute a simple read-only query.
For a related check, see odbc32.dll troubleshooting. Browse the DLL Errors & Fixes Library. Official reference: PostgreSQL libpq documentation.