PostGIS is authoritative; AGOL is a synchronized projection. Edits flow both ways without either side blocking.
Edits flow both ways, asynchronously, with PostGIS as the source of truth:
AFTER triggers write to an outbox table in the same transaction as the feature write. A standalone worker drains the outbox and pushes to AGOL via the GeoServices REST API (applyEdits, append, addFeatures, updateFeatures, deleteFeatures).inbound_queue; a worker applies them with optimistic concurrency keyed on agol_version.FOR UPDATE SKIP LOCKED.Neither side blocks the other. Editors in ArcGIS Online and editors working in Postgres see their changes converge asynchronously, with explicit conflict handling rather than silent overwrites.
-- push pending outbound edits now (instead of waiting for the worker)
SELECT agol_fdw.push_outbox();
-- apply pending inbound edits delivered via webhooks
SELECT agol_fdw.apply_inbound();
-- do both, plus a reconcile audit, in one call
SELECT agol_fdw.sync_now();