ImageMosaic creation/update very slow when database has many tables

Description

After upgrading Geoserver from 2.7.4 to 2.8.2, updating existing image mosaics or creating new ones (with configuration saved in a PostGIS DB having thousands of other tables) became extremely slow and hung up other Geoserver until completed. I tracked the problem down to this line in Geotools, which causes every table in the database to be examined.

I am not sure if this is working as designed, but a workaround is to add "TypeNames=false" to the image mosaic's datastore.properties file, which will prevent this code block from being called. This should probably be included in the ImageMosaic documentation.

Environment

Ubuntu 14.04, OS X

Status

Assignee

Andrea Aime

Reporter

Matt Bertrand

Triage

None

Fix versions

Affects versions

None

Priority

Medium
Configure