Pggate has an interface for a foreign key cache (PgGate_ForeignKeyReferenceExists, etc). Currently this cache is implemented in a per session way. Depending on how pg uses this cache, it may be broken in a distributed setting. For example, connection A inserts and commits to table A (row gets inserted into foreign key cache), then connection B deletes and commits that row, then connection A inserts to table B with a foreign key constraint on table A. The cache may allow the last insert to succeed even if it should fail due to the foreign key constraint.
Pggate has an interface for a foreign key cache (PgGate_ForeignKeyReferenceExists, etc). Currently this cache is implemented in a per session way. Depending on how pg uses this cache, it may be broken in a distributed setting. For example, connection A inserts and commits to table A (row gets inserted into foreign key cache), then connection B deletes and commits that row, then connection A inserts to table B with a foreign key constraint on table A. The cache may allow the last insert to succeed even if it should fail due to the foreign key constraint.