Skip to content

Add transactional support for ENR temp tables #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

timchang514
Copy link
Contributor

@timchang514 timchang514 commented Apr 23, 2024

Description

ENR temp tables were not sensitive to transactional behavior. We add it here by introducing a new structure which will track uncommitted ENR tuples and process them accordingly, depending on if the active transaction is committed or rolled back.

Tests are added in babelfish-for-postgresql/babelfish_extensions#2522

Issues Resolved

BABEL-4864

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the PostgreSQL license, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

{
EphemeralNamedRelation tmp_enr = (EphemeralNamedRelation) (lc);

if (strcmp(enr->md.name, tmp_enr->md.name) == 0 && tmp_enr->md.dropped_subid == enr->md.dropped_subid)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given that we are handling this during rollback itself, we can skip this optimisation in favour of simplicity

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, fixed. Noting that surendra has approved PR (in case this gets lost due to force push).

Copy link
Contributor

@lejaokri lejaokri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at notes seems Surendra has approved this one.

@forestkeeper forestkeeper merged commit 1d1b547 into babelfish-for-postgresql:BABEL_4_X_DEV__PG_16_X May 22, 2024
2 checks passed
forestkeeper pushed a commit to babelfish-for-postgresql/babelfish_extensions that referenced this pull request May 22, 2024
roshan0708 pushed a commit to amazon-aurora/postgresql_modified_for_babelfish that referenced this pull request Oct 15, 2024
…ostgresql#348)

Add transactional support for ENR temp tables

Issues Resolved: BABEL-4864
Signed-off-by: Tim Chang <[email protected]>
roshan0708 pushed a commit to amazon-aurora/postgresql_modified_for_babelfish that referenced this pull request Oct 18, 2024
…ostgresql#348)

Add transactional support for ENR temp tables

Issues Resolved: BABEL-4864
Signed-off-by: Tim Chang <[email protected]>
roshan0708 pushed a commit to amazon-aurora/postgresql_modified_for_babelfish that referenced this pull request Oct 18, 2024
…ostgresql#348)

Add transactional support for ENR temp tables

Issues Resolved: BABEL-4864
Signed-off-by: Tim Chang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants