fix: don't rely on constraint for filecache_extended "upsert" when in transaction - #62587
Merged
Merged
Conversation
icewind1991
requested review from
Altahrim,
come-nc,
provokateurin and
salmart-dev
and removed request for
a team
July 27, 2026 15:25
CarlSchwan
approved these changes
Jul 27, 2026
icewind1991
force-pushed
the
filecache-extension-insert-transaction
branch
2 times, most recently
from
July 28, 2026 11:56
38f987e to
51e734d
Compare
Merged
Merged
Merged
susnux
approved these changes
Sep 2, 2026
… transaction Signed-off-by: Robin Appelman <robin@icewind.nl>
susnux
force-pushed
the
filecache-extension-insert-transaction
branch
from
September 2, 2026 10:43
51e734d to
4eeb77b
Compare
Contributor
|
/backport to stable35 |
Contributor
|
/backport to stable34 |
Contributor
|
/backport to stable33 |
Contributor
|
/backport to stable32 |
This was referenced Sep 3, 2026
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Postgresql aborts the transaction on the constraint violation, so instead we need to manually check if we need to do an update or insert when in a transaction.
In the long term we really need a proper "upsert" or "insert ignore" in the query builder to make use of the various tools that databases offer for this
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)