changed the order of update/insert for postgres#30
Open
rfdrake wants to merge 1 commit intocvicente:masterfrom
Open
changed the order of update/insert for postgres#30rfdrake wants to merge 1 commit intocvicente:masterfrom
rfdrake wants to merge 1 commit intocvicente:masterfrom
Conversation
With the normal order, updatedevices can end up filling the postgres logs with thousands of lines like this:
2014-01-09 22:20:14 EST ERROR: duplicate key value violates unique constraint "ipblock1"
2014-01-09 22:20:14 EST DETAIL: Key (address, prefix)=(184398081, 32) already exists.
2014-01-09 22:20:14 EST STATEMENT: INSERT INTO ipblock
(address,prefix,version,status,first_seen,last_seen)
VALUES ($1, $2, $3, $4, $5, $6)
This fixes it so UPDATE is tried first, then INSERT if no rows were updated.
vink78
added a commit
to vink78/Netdot
that referenced
this pull request
Feb 6, 2025
DNSSEC: activation on master
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.
With the normal order, updatedevices can end up filling the postgres logs with thousands of lines like this:
This fixes it so UPDATE is tried first, then INSERT if no rows were updated.