Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geogig-dev] Sync changes from GeoGig repository back to Postgis

Hi everyone,

"The main issue with allowing people to update the PostGIS table is that you need to be able to track what change's they've made.  You can do this with audit triggers on the database, or you can can do a brute-force diff using GeoGig to do a feature-by-feature compare to see what's changed.  "

What about using Logical Decoding or logical Replication on PostGIS-Databases in order to mitigate the "brute-force approach" looking through all features?
Using logical decoding/replication you're able to track change sets inside the PostGIS DB without the need to create triggers.

You can configure and accesss these change sets with pure (postgresql-specific) SQL code. So what about writing a geogig import step that 
a) Initially sets up such replication slots and
b) consumes the changes when triggered? 

This would make integration of larger databases faster in order of magnitudes as only the inserted/updated/deleted rows are processed.

https://www.postgresql.org/docs/10/static/logical-replication.html

Kind regards,
Sebastian

Back to the top