Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Geoserver with Geocache to get WMS tiles and a PostGIS backend. There are 2 systems using the PostGIS database: one that is with Geoserver and one that is an old system that just uses the database. All changes made to the geometry using either system need to cause the tiles to be recreated, and we can't change the code in the old system. I think I need to use a trigger in PostGIS. I understand how to create the trigger, but how do I make it regenerate the tiles that include the point that was changed?

share|improve this question
up vote 3 down vote accepted

One option is create trigger into postgis table which uses "NOTIFY channel_name message" when something happens. Then create software which connects to postgresql and executes "LISTEN channel_name" and when something happens on channel it executes command which re-creates tiles. You can forward needed coordinates with in message

share|improve this answer
I understand the trigger part and the notify part but what do I use to make the second part - the software that connects to postgresql and executes the Listen? – bl8rchk Mar 27 '13 at 12:51
as I undestand it, you use external program to compile tile, not postgis. So you code program that connects to postgis and LISTENs channel_name. When it hears somethign , it executes re-tiling. see… .. gives you idea howto do it straight from trigeer, but it has more problems that listen notify design – simplexio Mar 27 '13 at 13:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.