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

fix: migration fails with error pq: VACUUM cannot run inside a transaction block #3464

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

atzoum
Copy link
Contributor

@atzoum atzoum commented Jun 8, 2023

Description

Issue introduced by #3434, since a VACUUM command cannot be executed inside a transaction. Vacuum or vacuum full are now being executed, if necessary, after the transaction completes. Added the necessary test case to verify proper behaviour.

Notion Ticket

Link

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

jobsdb/migration.go Show resolved Hide resolved
jobsdb/migration.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Patch coverage: 63.63% and project coverage change: +0.24 🎉

Comparison is base (4116f37) 68.51% compared to head (b57cf04) 68.75%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3464      +/-   ##
==========================================
+ Coverage   68.51%   68.75%   +0.24%     
==========================================
  Files         330      330              
  Lines       53034    53042       +8     
==========================================
+ Hits        36335    36468     +133     
+ Misses      14335    14205     -130     
- Partials     2364     2369       +5     
Impacted Files Coverage Δ
jobsdb/migration.go 77.87% <61.29%> (+1.88%) ⬆️
jobsdb/backup.go 75.04% <100.00%> (+0.04%) ⬆️

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@atzoum atzoum merged commit 9e32802 into master Jun 8, 2023
@atzoum atzoum deleted the fix.vacuumTx branch June 8, 2023 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants