Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Investigate pggate foreign key implementation #46

Open
jfunston opened this issue Sep 26, 2022 · 0 comments
Open

Investigate pggate foreign key implementation #46

jfunston opened this issue Sep 26, 2022 · 0 comments

Comments

@jfunston
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant