4 ms·
Foreign data wrappers. "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is n
by CuriouslyC 4y ago
Foreign data wrappers.
"During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints."
- riku_iki 4y agodoes it support two-phase commit? What if local transaction succeeded, and remote failed? Cluster will have inconsistent data?..
- CuriouslyC 4y agoThe mental model is slightly different. FDWS are basically server -> server linkages, not literally clustering. As a result, data consistency between servers is less of an issue - the data is likely to only live in one place (read replicas and failovers notwithstanding). There may be some error handling and try/rollback around remote transactions baked into postgres_fdw but I'm not familiar enough to say.