mapnik / mapnik-support

Use the issues queue here to ask questions and offer help on using Mapnik (maybe if this works well we can retire the mailing list at http://mapnik.org/contact/?)
6 stars 6 forks source link

How to run provided SQL on connection to PostgreSQL? #141

Open zdila opened 4 years ago

zdila commented 4 years ago

On a server we have two instances of map rendering services. One pre-renders in the background and other on HTTP request. We already run background service with lower system priority and we want to do the same for its postgres connection by executing SELECT set_backend_priority(pg_backend_pid(), 10); on DB connection.

I found no parameter in PostGIS for this. Is something like this actually possible?

Thanks.

zdila commented 4 years ago

Our workaround is to add such SQL to some layer. Example:

select set_backend_priority(pg_backend_pid(), 10), geometry, name, type from osm_waterways