• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / pg_net / 34647014962
94%

Build:
DEFAULT BRANCH: master
Ran 11 Sep 2026 09:01PM UTC
Jobs 1
Files 6
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Sep 2026 08:58PM UTC coverage: 94.286% (+0.2%) from 94.074%
34647014962

push

github

web-flow
fix: minor improvements (xact callback leak, `pg_net.ttl` validation) (#278)

* fix: register the wake xact callback only once per backend

`net.wake()` called `RegisterXactCallback(wake_at_commit)` in every
transaction where `wake_commit_cb_active` was false, i.e. once per
transaction that uses pg_net. `RegisterXactCallback` appends a new entry
to a backend-wide list in TopMemoryContext on every call and never
deduplicates, and nothing ever unregistered it.

On a long-lived backend (e.g. behind a connection pooler) that fires
webhooks continuously this leaks ~40 bytes per transaction and makes
`CallXactCallbacks` walk an ever-growing list on every transaction
event, for every transaction on that backend.

Register the callback once per backend and keep
`wake_commit_cb_active` as the per-transaction gate.

The new test measures TopMemoryContext of a backend across 5000
single-statement transactions calling `net.wake()`. Measured on PG 17:
200,120 bytes of growth before this fix, 0 bytes after. Skipped on
PG < 14 where `pg_backend_memory_contexts` doesn't exist.

* fix: validate pg_net.ttl when it is set

Add a GUC check hook for `pg_net.ttl` that parses the value with
`interval_in` and rejects invalid and negative intervals at
SET/ALTER SYSTEM/config-reload time, with the interval parser's own
message as the error detail. Previously an invalid value was accepted
and only failed later inside the worker's expired-response delete.

Closes #268.

* test: assert the full error message for invalid pg_net.ttl values

Check the exact primary message and DETAIL line via the driver's
diagnostics instead of two substrings, so the test documents the
complete error a user sees on ALTER SYSTEM.

22 of 22 new or added lines in 1 file covered. (100.0%)

528 of 560 relevant lines covered (94.29%)

410.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34647014962.1 11 Sep 2026 09:01PM UTC 6
94.29
GitHub Action Run
Source Files on build 34647014962
  • Tree
  • List 6
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34647014962
  • ee5e4134 on github
  • Prev Build on master (#34471771885)
  • Next Build on master (#35009063958)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc