Add test for early backend startup errors
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Add test for early backend startup errors The new test tests the libpq fallback behavior on an early error, which was fixed in the previous commit. This adds an IS_INJECTION_POINT_ATTACHED() macro, to allow writing injected test code alongside the normal source code. In principle, the new test could've been implemented by an extra test module with a callback that sets the FrontendProtocol global variable, but I think it's more clear to have the test code right where the injection point is, because it has pretty intimate knowledge of the surrounding context it runs in. Reviewed-by: Michael Paquier Discussion: https://www.postgresql.org/message-id/CAOYmi%2Bnwvu21mJ4DYKUa98HdfM_KZJi7B1MhyXtnsyOO-PB6Ww%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/xfunc.sgml | modified | +25 −0 |
| src/backend/tcop/backend_startup.c | modified | +16 −0 |
| src/backend/utils/misc/injection_point.c | modified | +14 −0 |
| src/include/utils/injection_point.h | modified | +3 −0 |
| src/interfaces/libpq/Makefile | modified | +3 −1 |
| src/interfaces/libpq/meson.build | modified | +1 −0 |
| src/interfaces/libpq/t/005_negotiate_encryption.pl | modified | +56 −0 |
Documentation touched
Discussion
- Direct SSL connection and ALPN loose ends 18 messages · 2024-04-29 → 2024-07-26