A plain ON CONFLICT DO UPDATE writes the row even when nothing changed — every feed poll rewrites thousands of identical entries, bumping updated_at and burning WAL. One SQL clause, IS DISTINCT FROM, makes Postgres skip the no-op write. The catch: when it skips, RETURNING returns nothing and Ecto raises StaleEntryError. Here is the full pattern, the rescue trick that turns the error into an :unchanged result, and the three-layer RSS dedup strategy it sits inside.
Engineering Blog
Engineering deep-dives from the SlashFeed team — Elixir, Phoenix, and how the product is built.
all
a11y
accessibility
ai
api
architecture
authentication
automations
beam
blog
boruta
browserless
build-in-public
cassandra
circuit-breaker
claude
cron
css
css-selectors
databases
debugging
discovery
dns
dnsmasq
documentation
driver-js
ecto
elixir
fido2
finch
floki
foreign-keys
hammer
headless-browser
hmac
hooks
images
javascript
keyboard
liveview
llm
markdown
mcp
media
meta
mfa
migrations
monitoring
multi-tenancy
nimble_publisher
nimble_totp
oauth2
oban
oidc
onboarding
open-graph
passkeys
performance
philosophy
phoenix
pkce
podcasts
postgres
postgresql
privoxy
ranking
rate-limiting
rss
scraping
security
seo
svg
syntax-highlighting
tor
totp
upsert
ux
wax
wcag
webauthn
webhooks
xandra
Zero-write upserts in Ecto with IS DISTINCT FROM