Use PG_MODULE_MAGIC_EXT macro in modules added in PG19

Started by Andreas Karlsson23 days ago6 messageshackers
Jump to latest
#1Andreas Karlsson
andreas.karlsson@percona.com

Hi,

It looks like we forgot about the PG_MODULE_MAGIC_EXT macro when adding
pg_plan_advice, pg_stash_advice and pgrepack so here is a patch fixing that.

Maybe we should also use the new macro in other places like our test
modules and our modules in the documentation and the tutorial but there
I am less certain and that is a separate topic.

--
Andreas Karlsson
Percona

Attachments:

v1-0001-Use-PG_MODULE_MAGIC_EXT-in-newly-introduced-modul.patchtext/x-patch; charset=UTF-8; name=v1-0001-Use-PG_MODULE_MAGIC_EXT-in-newly-introduced-modul.patchDownload+12-4
#2Michael Paquier
michael@paquier.xyz
In reply to: Andreas Karlsson (#1)
Re: Use PG_MODULE_MAGIC_EXT macro in modules added in PG19

On Thu, Jul 02, 2026 at 11:55:55PM +0200, Andreas Karlsson wrote:

It looks like we forgot about the PG_MODULE_MAGIC_EXT macro when adding
pg_plan_advice, pg_stash_advice and pgrepack so here is a patch fixing that.

Maybe we should also use the new macro in other places like our test modules
and our modules in the documentation and the tutorial but there I am less
certain and that is a separate topic.

It would be sad to see all that missing the release train, as the SQL
function to see loaded libraries is super useful. Will probably take
care of it in a few days, except if their respective committers show
up in-between.
--
Michael

#3Robert Haas
robertmhaas@gmail.com
In reply to: Michael Paquier (#2)
Re: Use PG_MODULE_MAGIC_EXT macro in modules added in PG19

On Thu, Jul 2, 2026 at 7:42 PM Michael Paquier <michael@paquier.xyz> wrote:

On Thu, Jul 02, 2026 at 11:55:55PM +0200, Andreas Karlsson wrote:

It looks like we forgot about the PG_MODULE_MAGIC_EXT macro when adding
pg_plan_advice, pg_stash_advice and pgrepack so here is a patch fixing that.

Maybe we should also use the new macro in other places like our test modules
and our modules in the documentation and the tutorial but there I am less
certain and that is a separate topic.

It would be sad to see all that missing the release train, as the SQL
function to see loaded libraries is super useful. Will probably take
care of it in a few days, except if their respective committers show
up in-between.

We've got a long holiday weekend coming up here so I'm not going to be
spending too much time at the keyboard the next few days, but I'm
happy to have you take care of this if you feel like doing that. If
you feel like I should take care of it, then I can do that next week.

--
Robert Haas
EDB: http://www.enterprisedb.com

#4Michael Paquier
michael@paquier.xyz
In reply to: Robert Haas (#3)
Re: Use PG_MODULE_MAGIC_EXT macro in modules added in PG19

On Thu, Jul 02, 2026 at 07:45:12PM -0400, Robert Haas wrote:

We've got a long holiday weekend coming up here so I'm not going to be
spending too much time at the keyboard the next few days, but I'm
happy to have you take care of this if you feel like doing that. If
you feel like I should take care of it, then I can do that next week.

Either way is fine by me. As you have already replied, please feel
free. Don't forget to enjoy your long weekend, of course.
--
Michael

#5Robert Haas
robertmhaas@gmail.com
In reply to: Michael Paquier (#4)
Re: Use PG_MODULE_MAGIC_EXT macro in modules added in PG19

On Thu, Jul 2, 2026 at 11:18 PM Michael Paquier <michael@paquier.xyz> wrote:

On Thu, Jul 02, 2026 at 07:45:12PM -0400, Robert Haas wrote:

We've got a long holiday weekend coming up here so I'm not going to be
spending too much time at the keyboard the next few days, but I'm
happy to have you take care of this if you feel like doing that. If
you feel like I should take care of it, then I can do that next week.

Either way is fine by me. As you have already replied, please feel
free. Don't forget to enjoy your long weekend, of course.

I'll admit that I was hoping this patch was going to get committed
without me needing to do something about it. Not that it's unfair to
expect me to do something about it, since 2/3 of this is my oversight,
but having patches for my mistakes magically get committed by other
people is even better than a long weekend.

But since I've now enjoyed the long weekend to the best of my ability
and no such magic has occurred, I've committed this and back-patched
to v19.

--
Robert Haas
EDB: http://www.enterprisedb.com

#6Michael Paquier
michael@paquier.xyz
In reply to: Robert Haas (#5)
Re: Use PG_MODULE_MAGIC_EXT macro in modules added in PG19

On Mon, Jul 06, 2026 at 03:48:04PM -0400, Robert Haas wrote:

But since I've now enjoyed the long weekend to the best of my ability
and no such magic has occurred, I've committed this and back-patched
to v19.

Thanks.
--
Michael