From d6d1dfcc99e3dd6e70e2a7024924e491bb7a9670 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 22 Nov 2021 07:40:17 +0100 Subject: Add ABI extra field to fmgr magic block This allows derived products to intentionally make their fmgr ABI incompatible, with a clean error message. Discussion: https://www.postgresql.org/message-id/flat/55215fda-db31-a045-d6b7-d6f2d2dc9920%40enterprisedb.com --- src/include/pg_config_manual.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/include/pg_config_manual.h') diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h index 614035e2159..225c5b87cc7 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h @@ -42,6 +42,23 @@ */ #define FUNC_MAX_ARGS 100 +/* + * When creating a product derived from PostgreSQL with changes that cause + * incompatibilities for loadable modules, it is recommended to change this + * string so that dfmgr.c can refuse to load incompatible modules with a clean + * error message. Typical examples that cause incompatibilities are any + * changes to node tags or node structures. (Note that dfmgr.c already + * detects common sources of incompatibilities due to major version + * differences and due to some changed compile-time constants. This setting + * is for catching anything that cannot be detected in a straightforward way.) + * + * There is no prescribed format for the string. The suggestion is to include + * product or company name, and optionally any internally-relevant ABI + * version. Example: "ACME Postgres/1.2". Note that the string will appear + * in a user-facing error message if an ABI mismatch is detected. + */ +#define FMGR_ABI_EXTRA "PostgreSQL" + /* * Maximum number of columns in an index. There is little point in making * this anything but a multiple of 32, because the main cost is associated -- cgit v1.2.3