cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.04k stars 3.8k forks source link

sql: add pgtests for savepoint / portal behavior - likely missing portal close upon ROLLBACK TO SAVEPOINT #52131

Open knz opened 4 years ago

knz commented 4 years ago

Today we do not have low-level pgwire tests for the behavior of savepoints in the context of portals.

If my understanding is right, postgres closes portals that were open "under" a nested txn if the nested txn is rolled back. I believe that cockroachdb does not do this correctly.

This should be exercised in a pgtest to observe the behavior of pg and crdb side-by-side.

Jira issue: CRDB-3980

github-actions[bot] commented 1 year ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!

DrewKimball commented 1 year ago

Question for foundations team: have we already fixed this during recent work on portals?

rafiss commented 1 year ago

Some tests for this were added in 6f615c6e29a6a28528adb5c2212fccd5dc0702eb

I don't think the exact case described in the issue is tested.