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

supabase / storage / 45397305467
89%

Build:
DEFAULT BRANCH: master
Ran 24 Nov 2026 12:51PM UTC
Jobs 2
Files 393
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

24 Nov 2026 12:49PM UTC coverage: 88.458%. Remained the same
45397305467

push

github

web-flow
perf(database): select no columns from the request scope statement (#1749)

Every transaction starts with the scope statement. Because `set_config`
returns the value it sets, Postgres sends the role, the JWT, its claims
and the request headers back as a row of 10 to 12 columns, which pg
decodes and nothing reads. This wraps the setters in a subquery, `SELECT
FROM (SELECT set_config(...), ...) AS scope`, so the statement returns
an empty row. Postgres still runs every setter, because the planner
never removes a subquery output that calls a volatile function. I
checked that all four variants of the statement apply their settings on
Postgres 13, 15 and 18, with both custom and generic plans. Multigres
only accepts `set_config` as a top-level SELECT target, so with
`DATABASE_ENGINE=multigres` the statement stays exactly as it is today.
The pg-connection integration test now checks that the scope statement
returns no fields on Postgres and returns its columns on Multigres.

I measured the statement on its own in Docker on Linux, with pg 8.23.1
and Postgres 15. It used the parameters of a real object info request (a
service role JWT and the headers of a Node client) and ran six
alternating rounds of 20,000 statements:

| Per scope statement | Before | After |
|---|---:|---:|
| Bytes from Postgres | 1,078 | 44 |
| Bytes to Postgres | 1,377 | 1,400 |
| Client CPU, object rows | 48.7 µs | 43.7 µs |
| Client CPU, array rows | 47.3 µs | 42.8 µs |

Client CPU was lower in every round. Real clients send more headers
(`apikey`, `x-client-info`, forwarding headers), so they save more bytes
than this. I also ran the whole server under load, with 4 storage
workers and wrk. Per request, Postgres sent 1.75 KB less for object info
and GET, which run two scoped transactions, 0.9 KB less for list and
sign, and 2.8 KB less for an upload. Throughput changed by less than the
noise on my machine, so I'm not claiming a change in req/s.

The change also applies cleanly on top of... (continued)

9901 of 11767 branches covered (84.14%)

Branch coverage included in aggregate %.

17115 of 18774 relevant lines covered (91.16%)

1284.03 hits per line

Jobs
ID Job ID Ran Files Coverage
1 rest-pg18 - 45397305467.1 24 Nov 2026 12:57PM UTC 368
68.97
GitHub Action Run
2 unit - 45397305467.2 24 Nov 2026 12:51PM UTC 384
71.9
GitHub Action Run
Source Files on build 45397305467
  • Tree
  • List 393
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #45397305467
  • ba916ffc on github
  • Prev Build on master (#45263270344)
  • Next Build on master (#45426170368)
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