diff options
author | Tom Lane | 2025-03-26 15:11:02 +0000 |
---|---|---|
committer | Tom Lane | 2025-03-26 15:11:02 +0000 |
commit | 55527368bd07248e91e3d37a782bf66b76f06865 (patch) | |
tree | 7bb79a5fedea00a79c5b447b1539e3098f0fde42 /src/backend/replication | |
parent | 9324c8c580655800331b0582b770e88c01b7a5c4 (diff) |
Use PG_MODULE_MAGIC_EXT in our installable shared libraries.
It seems potentially useful to label our shared libraries with version
information, now that a facility exists for retrieving that. This
patch labels them with the PG_VERSION string. There was some
discussion about using semantic versioning conventions, but that
doesn't seem terribly helpful for modules with no SQL-level presence;
and for those that do have SQL objects, we typically expect them
to support multiple revisions of the SQL definitions, so it'd still
not be very helpful.
I did not label any of src/test/modules/. It seems unnecessary since
we don't install those, and besides there ought to be someplace that
still provides test coverage for the original PG_MODULE_MAGIC macro.
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com
Diffstat (limited to 'src/backend/replication')
-rw-r--r-- | src/backend/replication/libpqwalreceiver/libpqwalreceiver.c | 5 | ||||
-rw-r--r-- | src/backend/replication/pgoutput/pgoutput.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c index c650935ef5d..ee3101c093e 100644 --- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c +++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c @@ -36,7 +36,10 @@ #include "utils/pg_lsn.h" #include "utils/tuplestore.h" -PG_MODULE_MAGIC; +PG_MODULE_MAGIC_EXT( + .name = "libpqwalreceiver", + .version = PG_VERSION +); struct WalReceiverConn { diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c index ac34092aaaf..693a766e6d7 100644 --- a/src/backend/replication/pgoutput/pgoutput.c +++ b/src/backend/replication/pgoutput/pgoutput.c @@ -36,7 +36,10 @@ #include "utils/syscache.h" #include "utils/varlena.h" -PG_MODULE_MAGIC; +PG_MODULE_MAGIC_EXT( + .name = "pgoutput", + .version = PG_VERSION +); static void pgoutput_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, bool is_init); |