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?

1 Answer 1


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

  • 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, 2013 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 postgresql.org/message-id/… .. postgresql.org/docs/9.2/interactive/plperl-trusted.html gives you idea howto do it straight from trigeer, but it has more problems that listen notify design Mar 27, 2013 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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