You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PG supports deferrable for PK, unique, foreign key and exclude constraints.
In YB, supporting deferrable for PK and unique constraints is non-trivial.
To begin with, we could support it only for FK constraints. This will help unblock issues like #3987 used by Django.
The text was updated successfully, but these errors were encountered:
Summary:
Deferred triggers access tuplestore at the end of subtransaction (after call of `AfterTriggerEndQuery` function).
But it is no accessible as pointer to tuplestore is stored in `query_stack` which is already empty at this point.
To solve the issue pointer to tuplestore for deferred trigger is be stored in new field `ybc_txn_fdw_tuplestore` of the `AfterTriggerSharedData` structure.
**Additional changes**
Deferred triggers are fired from the `CommitTransaction` function and YB transaction must not be committed before that time. Calling of `YBCPgCommitTransaction` function is moved inside `CommitTransaction` function.
Test Plan:
Postgresql regression tests were uncommented
```
./yb_build.sh --java-test org.yb.pgsql.TestPgForeignKey
./yb_build.sh --cxx-test pg_on_conflict-test --gtest_filter PgOnConflictTest.ValidSessionAfterTxnCommitConflict
```
Reviewers: mikhail, neha, mihnea
Reviewed By: mihnea
Subscribers: yql
Differential Revision: https://phabricator.dev.yugabyte.com/D8379
PG supports deferrable for PK, unique, foreign key and exclude constraints.
In YB, supporting deferrable for PK and unique constraints is non-trivial.
To begin with, we could support it only for FK constraints. This will help unblock issues like #3987 used by Django.
The text was updated successfully, but these errors were encountered: