geoserver/geoserver — pull request #36 by edyskant (2012-10-05 19:49:58+00:00)
Title: Don't add virtual table if the virtual table's already in the datastore

ResourcePool called addVirtualTable even when the identical virtual table's already stored in the DataStore. The DataStore does a catalog query against the PostGIS database whenever adding a virtual table. So, this resulted in a postgis query for every tile loaded, even when the tile was cached.

This patch checks to make sure the virtual table isn't already in the DataStore before adding it.