diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/fmgr.h | 7 | ||||
-rw-r--r-- | src/include/pg_config_manual.h | 17 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/include/fmgr.h b/src/include/fmgr.h index ab7b85c86e1..cec663bdff0 100644 --- a/src/include/fmgr.h +++ b/src/include/fmgr.h @@ -458,6 +458,7 @@ typedef struct int indexmaxkeys; /* INDEX_MAX_KEYS */ int namedatalen; /* NAMEDATALEN */ int float8byval; /* FLOAT8PASSBYVAL */ + char abi_extra[32]; /* see pg_config_manual.h */ } Pg_magic_struct; /* The actual data block contents */ @@ -468,9 +469,13 @@ typedef struct FUNC_MAX_ARGS, \ INDEX_MAX_KEYS, \ NAMEDATALEN, \ - FLOAT8PASSBYVAL \ + FLOAT8PASSBYVAL, \ + FMGR_ABI_EXTRA, \ } +StaticAssertDecl(sizeof(FMGR_ABI_EXTRA) <= sizeof(((Pg_magic_struct*)0)->abi_extra), + "FMGR_ABI_EXTRA too long"); + /* * Declare the module magic function. It needs to be a function as the dlsym * in the backend is only guaranteed to work on functions, not data 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 @@ -43,6 +43,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 * with index tuple header size (see access/itup.h). |