Summary
Calling Database.serve() after LOAD <extension> makes previously loaded extensions unusable. Install files on disk remain, but Catalog/VFS registrations are gone.
Root cause
PyDatabase::serve() currently does:
database->Close();
database->Open(database->config());
Close() resets planner_, which (today) owns MetadataManager / Catalog. Open() constructs a new empty GOptPlanner, so extension functions registered by LOAD disappear.
createCheckpoint() itself does not clear MetadataManager; the loss comes from tearing down the planner during Close/Open.
Why this is wrong
serve() only needs to persist AP-mode changes before switching to TP service. That intent matches createCheckpoint(true) (compact + dump + reopen graph in place), which should keep planner / Catalog / LOADed extensions intact.
NeugDBService::init already requires the DB to be open and reuses GetPlanner() / GetQueryCache().
Proposed direction
- Change
serve() to roughly:
CloseAllConnection() (local AP connections must be closed)
createCheckpoint(true) (persist + refresh graph)
- start
NeugDBService
- Avoid
Close() + Open() on the serve path unless something TP-specific still requires a full reopen.
- Optionally keep
MetadataManager lifetime on NeugDB as a safety net for any remaining Close/Open cycles.
Summary
Calling
Database.serve()afterLOAD <extension>makes previously loaded extensions unusable. Install files on disk remain, but Catalog/VFS registrations are gone.Root cause
PyDatabase::serve()currently does:Close()resetsplanner_, which (today) ownsMetadataManager/ Catalog.Open()constructs a new emptyGOptPlanner, so extension functions registered byLOADdisappear.createCheckpoint()itself does not clear MetadataManager; the loss comes from tearing down the planner during Close/Open.Why this is wrong
serve()only needs to persist AP-mode changes before switching to TP service. That intent matchescreateCheckpoint(true)(compact + dump + reopen graph in place), which should keep planner / Catalog / LOADed extensions intact.NeugDBService::initalready requires the DB to be open and reusesGetPlanner()/GetQueryCache().Proposed direction
serve()to roughly:CloseAllConnection()(local AP connections must be closed)createCheckpoint(true)(persist + refresh graph)NeugDBServiceClose()+Open()on the serve path unless something TP-specific still requires a full reopen.MetadataManagerlifetime onNeugDBas a safety net for any remaining Close/Open cycles.