From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add test for early backend startup errors
Date: Fri, 26 Jul 2024 12:38:54 +0000
Message-ID: <E1sXKDm-001Iy7-0u@gemulon.postgresql.org> (raw)
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.g...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/20e0e7da9bc0089433c70b2b53ddf6a340ab5df3
Modified Files
--------------
doc/src/sgml/xfunc.sgml | 25 ++++++++++
src/backend/tcop/backend_startup.c | 16 +++++++
src/backend/utils/misc/injection_point.c | 14 ++++++
src/include/utils/injection_point.h | 3 ++
src/interfaces/libpq/Makefile | 4 +-
src/interfaces/libpq/meson.build | 1 +
src/interfaces/libpq/t/005_negotiate_encryption.pl | 56 ++++++++++++++++++++++
7 files changed, 118 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add test for early backend startup errors
In-Reply-To: <E1sXKDm-001Iy7-0u@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox