I am looking to try and find the optimal fit for a number of rectangular shaped polygons into a larger irregular shaped polygon and I haven't found much information about how this could be achieved in PostGIS. I have found a solution using ArcGIS Desktop at Fitting known size polygons into irregular polygons using ArcGIS Desktop? However, I don't have a licence.
Doing some research it looks like I will need to use some kind of bin packing algorithm, however most of these algorithms deal with fitting small regular rectangles or squares into a large rectangle or square.