summary refs log tree commit diff
path: root/changelog.d/10442.misc
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-07-22 12:39:50 +0100
committerGitHub <noreply@github.com>2021-07-22 12:39:50 +0100
commit38b346a504cd4155b1986d50ebcff2199e1690be (patch)
tree70c3760c8d54cc64617714ebe7f99166d19ab28a /changelog.d/10442.misc
parentFix a handful of type annotations. (#10446) (diff)
downloadsynapse-38b346a504cd4155b1986d50ebcff2199e1690be.tar.xz
Replace `or_ignore` in `simple_insert` with `simple_upsert` (#10442)
Now that we have `simple_upsert` that should be used in preference to
trying to insert and looking for an exception. The main benefit is that
we ERROR message don't get written to postgres logs.

We also have tidy up the return value on `simple_upsert`, rather than
having a tri-state of inserted/not-inserted/unknown.
Diffstat (limited to 'changelog.d/10442.misc')
-rw-r--r--changelog.d/10442.misc1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/10442.misc b/changelog.d/10442.misc
new file mode 100644
index 0000000000..b8d412d732
--- /dev/null
+++ b/changelog.d/10442.misc
@@ -0,0 +1 @@
+Replace usage of `or_ignore` in `simple_insert` with `simple_upsert` usage, to stop spamming postgres logs with spurious ERROR messages.