diff --git a/src/backend/postmaster/launch_backend.c b/src/backend/postmaster/launch_backend.c index d23aed237d2cf..662ac885b9d80 100644 --- a/src/backend/postmaster/launch_backend.c +++ b/src/backend/postmaster/launch_backend.c @@ -661,6 +661,15 @@ SubPostmasterMain(int argc, char *argv[]) */ LocalProcessControlFile(false); + /* + * Re-register built-in dynamic managers (e.g. md smgr). On fork-based + * platforms the child inherits the postmaster's already-populated smgr + * table; under EXEC_BACKEND the child starts with an empty table, so we + * must re-run registration. Must happen before shared_preload_libraries + * so extensions can still register their own smgrs from _PG_init(). + */ + register_builtin_dynamic_managers(); + /* * Reload any libraries that were preloaded by the postmaster. Since we * exec'd this process, those libraries didn't come along with us; but we