How it works
ArcGIS Online on one side, PostGIS on the other — agol_fdw is the bridge that keeps them aligned, with PostGIS authoritative.
The extension owns a schema called agol_fdw that holds three things: a metadata catalog (what it learned about each AGOL layer), queue and log tables (the outbox, inbound_queue, conflict_log, validation_issues, sync_run_log), and plpython3u functions callable from SQL.
The materialized feature tables themselves live in an ordinary schema you choose (default data) — they're plain Postgres + PostGIS tables, not locked inside the extension. A standalone Python worker drains both queues (woken via LISTEN/NOTIFY).
data.poles).AFTER trigger writes to the outbox in the same transaction — rollback cancels both.FOR UPDATE SKIP LOCKED and pushes to AGOL via the GeoServices REST API (applyEdits / append / addFeatures / updateFeatures / deleteFeatures).inbound_queue.agol_version — conflicts go to conflict_log, never auto-resolved.Materialized tables carry a few extra columns the bridge relies on:
objectid bigint — the AGOL object id.globalid uuid — the AGOL global id.agol_version bigint — the version used for optimistic concurrency.