The existing db optimize action can optionally have a parameter /db/{owner}/{db}/optimize?shrink_to_fit=true that will more aggressively shrink the space taken by the database. Add it as an option to the optimize action on the db for both user actions and admin db actions (/admin/db/{owner}/{db}/optimize?shrink_to_fit=true).
The existing db optimize action can optionally have a parameter
/db/{owner}/{db}/optimize?shrink_to_fit=truethat will more aggressively shrink the space taken by the database. Add it as an option to the optimize action on the db for both user actions and admin db actions (/admin/db/{owner}/{db}/optimize?shrink_to_fit=true).