model-writtenrun 3152 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Zhang reported that a missing SSL certificate file produced the unhelpful numeric error 2147483650 and attached stat-based prechecks for certificate, CA, and CRL files #1.
- Heikki Linnakangas proposed decoding OpenSSL system errors with ERR_SYSTEM_ERROR and ERR_GET_REASON instead of prechecking files, and Stephen Frost supported that approach if it worked #2 #3.
- Tom Lane reproduced the problem with OpenSSL 3.1.1 but not 1.1.1, then tested an inline SSLerrmessage() fix guarded for compatibility with older OpenSSL; Daniel Gustafsson explained the changed error encoding and approved the fix #5 #6 #7.
- Tom committed the discussion-derived fix for both backend and libpq error reporting, with comments and backpatches to supported branches, superseding David's file-precheck attachment c42e5fdcfa #8.
- After committing, Tom noted similar error-handling code in src/common/cryptohash_openssl.c and src/common/hmac_openssl.c, but left it unchanged because its exposure to system errors was uncertain and suggested consolidating the implementations if further work was needed #8.
- Peter Eisentraut later identified that the libpq fix used non-thread-safe strerror() and proposed strerror_r(); Daniel approved the correction, while Tom asked whether Windows required SOCK_STRERROR #9 #10 #11.
- Peter explained that OpenSSL did not translate Winsock errors and that thread safety motivated its refusal to return system-error strings; Tom accepted the portability explanation and requested clearer comments #12 #13.
- Peter attached the strerror_r() correction with revised backend and frontend comments and requested backpatching, and Daniel approved the final patch #14 #15.
- Peter committed that attachment unchanged apart from rebasing and confirmed completion, leaving both error-reporting fixes landed while the earlier suggestion to consolidate common error handling remained unimplemented in this thread 1e666fd7c6 #16 #8.