Skip to content
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

Revert "Release RowExclusiveLock on pg_dist_transaction as soon as remote xacts are recovered" #7877

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

onurctirtir
Copy link
Member

@onurctirtir onurctirtir commented Feb 4, 2025

This reverts commit 684b4c6.

--

In #7863, we attempted to fix #7875 but it doesn't seem like a proper way of doing that, hence reverting.

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.46%. Comparing base (c55bc8c) to head (273932d).
Report is 16 commits behind head on release-13.0.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-13.0    #7877      +/-   ##
================================================
- Coverage         89.48%   89.46%   -0.02%     
================================================
  Files               276      276              
  Lines             60063    59892     -171     
  Branches           7524     7510      -14     
================================================
- Hits              53747    53584     -163     
+ Misses             4166     4165       -1     
+ Partials           2150     2143       -7     

@onurctirtir onurctirtir force-pushed the release-13.0-revert-684b4c6 branch from 00f462d to 441c820 Compare February 4, 2025 08:30
@onurctirtir onurctirtir force-pushed the release-13.0-revert-684b4c6 branch from 5f239cb to 273932d Compare February 4, 2025 08:47
Copy link
Collaborator

@marcoslot marcoslot left a comment

Choose a reason for hiding this comment

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

Thanks. Not sure what can happen after the lock gets released, but since DDL commands normally don't anticipate having uncommitted tuples you might get into nasty situations (e.g. table rewrite during ALTER TABLE incorrectly treats tuple as committed/aborted).

Probably there needs to be an "update extension lock" somewhere that freezes the maintenance daemon to avoid deadlocking with it.

I believe that was the goal of LockCitusExtension, but not sure that the lock happens on the other end. Probably a utility hook for ALTER EXTENSION should do that.

@onurctirtir
Copy link
Member Author

Thanks. Not sure what can happen after the lock gets released, but since DDL commands normally don't anticipate having uncommitted tuples you might get into nasty situations (e.g. table rewrite during ALTER TABLE incorrectly treats tuple as committed/aborted).

Probably there needs to be an "update extension lock" somewhere that freezes the maintenance daemon to avoid deadlocking with it.

I believe that was the goal of LockCitusExtension, but not sure that the lock happens on the other end. Probably a utility hook for ALTER EXTENSION should do that.

Thanks Marco for the heads-up, once again!

I believe that was the goal of LockCitusExtension, but not sure that the lock happens on the other end. Probably a utility hook for ALTER EXTENSION should do that.

And it's very good to know that because @codeforall also suggested a similar idea to fix this but I wasn't aware of the fact that this was the goal of LockCitusExtension() already.

We'll further investigate this, thanks!

@onurctirtir onurctirtir merged commit b6b73e2 into release-13.0 Feb 4, 2025
119 checks passed
@onurctirtir onurctirtir deleted the release-13.0-revert-684b4c6 branch February 4, 2025 11:00
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.

2 participants