Skip to content

Supabase and PostgresDatabase and Postgresreference

Supabase read replicas: how requests reach them and what they cost

A Supabase read replica is a second database billed at the primary’s compute size, and it only earns that bill if requests reach it. This page maps which requests can, which never do, what the replica costs line by line, and how to measure its share yourself.

Pricing, prerequisites and the product boundaries here are documented rather than measured: the Supabase docs were read on 2026-10-08 and every such claim carries a footnote. Eleven groups of runs were measured in the supabase-lab. The prerequisite chain on a Pro org (sfp-platforms S07/S07e, 2026-08-25) and a same-region replica on a Medium primary in ap-southeast-2 (medium-serverless MS06, 2026-09-30) cover creating a replica. RR01 (replica-routing, 2026-10-10) covers routing and lag: Pro org, one project with a Small primary in ap-northeast-1 and a replica in ap-southeast-1, one run. RR02 (2026-10-23, two runs in the same shape) covers a lagging, down or removed replica and the other products through the load balancer. RR03 (2026-10-26, two runs, one project each) moved both databases into one region: a Small primary and a Small replica in ap-southeast-1, with @supabase/supabase-js 2.118.0, and covers user tokens and RLS on the replica, key types, function calls by method, HEAD, the same-region split and lag under steady writes. Four more groups, each in that same-region shape (Small primary and Small replica in ap-southeast-1, Singapore workstation, supabase-js 2.118.0): RR04 (2026-10-26, two runs) covers read-your-writes through the load balancer, the split under load, a stopped replay and a restart, and the replica host’s HEAD refusal; RR06 (2026-10-28, two runs) adds a custom domain; RR07 (2026-10-28, runs 0 to 2, of which runs 1 and 2 completed) puts a routing Worker on a hostname in the app’s own zone and runs OAuth, SAML and browser CORS through it; RR08 (2026-10-28, two runs) sets max_standby_streaming_delay and hot_standby_feedback against Data API reads while the primary updates and vacuums. RR09 (2026-11-09, three runs on a Team org, one past the replica step: run 3, every arm but RR09g) keeps that shape (raw fetch in place of supabase-js) with the disk grown to 24 GB and a 4,000,000-row table, 3.81 GB of heap, and adds cold reads per node through a custom host and through the load balancer, the same with four sequential scans keeping the primary’s disk busy, what a project’s edge_logs record per hostname, and building the replica before a large load. RR10 (2026-11-10, one run on a Team org) copied a 4,000,000-row table from a Postgres 15.19 source with a replica to two 17.11 targets by logical replication, three Small projects in ap-southeast-1 with pitr_7 and 24 GB disks, and recorded whether and when each replica served. RR01 sent GETs and POSTs through the load balancer from a Singapore workstation and from Edge Functions in eight regions, read what the load balancer logged, and held a long query on the replica while the primary ran conflicting commands. Each measured row names its module id and date; the rest is labelled documented or inferred. The page says where RR01 stops: one project, one run, one replica region, one client at a few requests per second.

TL;DR

  • Over HTTP, only Data API GET requests can be served by a replica, and only when they go to the API load balancer endpoint or to the replica’s own API endpoint; SQL over the replica’s own pooler or connection string also reaches it. Non-GET requests through the load balancer go to the primary.1
  • A Postgres function called over POST /rest/v1/rpc/... is a non-GET request. In supabase-js, rpc(fn, args, { get: true }) sends it as a GET, which the docs name as the way to run a read-only function on a replica.12
  • Auth always runs on the primary, even through the load balancer; Storage and Realtime cannot use a replica either.1 A custom domain bypasses the load balancer:1 in RR06e (2026-10-28, two runs) 200 of 200 anonymous GETs and 50 of 50 user-token reads through the custom host were served by the primary in each run, while the interleaved load balancer GETs split 105 / 95 and 102 / 98 replica / primary.
  • A replica bills compute at the primary’s size by the hour, a disk 1.25x the primary’s billed from the first byte, and copies of any provisioned IOPS, throughput and IPv4.34 Compute credits do not apply to it, and the spend cap does not cover it.35
  • Read the replica’s share from the API logs field metadata.load_balancer_redirect_identifier, from API Reports, or from Database Reports with the Source toggle set to the replica.16
  • Measured 2026-10-10 (RR01, Tokyo primary, Singapore replica): 40 of 40 GETs to rpc/rr_whoami through the load balancer from a Singapore workstation were served by the replica, and a POST to the same function and a POST insert were served by the primary. From Edge Functions pinned with x-region, the replica served ap-southeast-1, ap-southeast-2, ap-south-1 and sa-east-1; the primary served ap-northeast-1, eu-west-1, us-east-1 and us-west-1. The load balancer’s log row names the choice, and it followed the request’s Cloudflare colo.
  • The load balancer did not route around a bad replica (RR02, 2026-10-23, two runs): it kept sending every read to a replica whose replay had stopped (up to 176,772 ms stale), sent none to the primary while the replica was down, and after the only replica was removed answered 400 Load balancer does not seem to be configured properly. for the rest of a 1,200 s watch. GraphQL through it is refused with 400.
  • With the primary and the replica in the same region (RR03h, 2026-10-26, two runs), the load balancer spread GETs over both, roughly half each, from every vantage tried: 111 / 89 and 94 / 106 replica / primary of 200 from a Singapore workstation, and about half from Edge Functions in ap-southeast-1, us-east-1 and eu-west-1. Across the cross-region runs the same workstation got 100 % replica.
  • The same-region split held at about half under every condition RR04h-k tried (RR04h-k, 2026-10-26, two runs): replica share 46.5 to 51.1 % at 1, 8 and 32 concurrent readers (up to 1,125.1 requests a second), 48.7 to 50.8 % with four busy loops on either node, and 46 of 102 and 180 of 343 reads in the stale window (46 and 160 of them stale) to a replica up to 30,669 ms stale. During a project restart, reads sent to whichever node was down failed. Read-your-writes through the load balancer held from this vantage: 0 misses in 456 replica-served reads straight after a POST (RR04e-g).
  • With a custom domain, keep Auth on it and send Data API reads to the load balancer (RR06f, RR07): a second supabase-js client on the load balancer host with accessToken reading the Auth client’s session read correctly 140 of 140 times before and after a refreshSession (which token it sent after the refresh was not logged), and a Cloudflare Worker on the app’s own hostname that sends GET and HEAD on /rest/v1/* to the load balancer and everything else to the custom domain carried password, OAuth (PKCE) and SAML sign-ins, with CORS headers identical to the custom host’s. OAuth named the custom host as callback whichever host the flow entered at (RR07h-j), and SAML metadata fetched through the Worker, custom and project hosts named it as entity ID and ACS (RR07m).
  • A user’s ES256 access token behaved on the replica as on the primary (RR03d, RR03e): the same rows under RLS, the same auth.uid(), for every key type, through the load balancer, the replica’s host and the primary’s host. In supabase-js, the accessToken option and a global Authorization header work against the replica’s host; auth.setSession() there fails (Failed to parse JSON) and the next read goes out with the anon key and returns 0 rows with no error.
  • Function calls route by method, not by volatility (RR03f): get: true calls of stable, security-definer and volatile read-only functions reached both nodes, every POST reached the primary, and a writing function called by GET answered 405 with 25006 on either node, so that error does not say which node answered.
  • A long replica query is cancelled when a primary command conflicts with it: max_standby_streaming_delay is 30 s and hot_standby_feedback is off on both nodes, and all 6 held queries in RR01 were cancelled with 40001 30 to 32 s after the primary’s command. Replay stopped for that time, so a row written afterwards was invisible on the replica for 30 to 32 s.
  • Data API reads of 1 to 7 s against a primary that updates about 2,000 rows a second and vacuums every 30 s (RR08, 2026-10-28, two runs): at the defaults no read failed at the client, but the replica counted 436 and 288 snapshot conflicts, reads ran up to 11,547 and 13,021 ms under an 8 s statement_timeout, and replay stopped for up to about 30 s at a time. Inferred, not measured: PostgREST retried the cancelled transactions, as PostgREST before v16.0 does;7 the version these projects ran was not read. hot_standby_feedback on removed the conflicts (0 and 0, data at most 250 and 236 ms old) and moved the cost to VACUUM on the primary; max_standby_streaming_delay 5 s capped staleness near 5 s with the most conflicts and slowest reads, and 120 s let replay stop for up to 122.8 s. Both settings were in force on both nodes at the first read, 10 s after the API call, with no restart.
  • Reads that miss the cache (RR09e, RR09f, 2026-11-09, Team org, one run of each arm): through a custom host the primary served 9,825 of 9,825 and took every buffer miss those requests caused; through the load balancer the requests split 1,529 / 1,629 primary / replica and the buffer misses 60,294 / 58,754. The load balancer kept about half the reads on a replica answering at 308.3 ms p50 against the primary’s 64.7 ms, and on the primary while four sequential scans kept its disk busy (4,989 / 4,961 primary / replica).
  • A project’s edge_logs recorded each of 80 tagged GETs under the hostname the client addressed, a custom host included, so grouping them by host shows which endpoint an app calls (RR09d). Of the 20 sent to the load balancer, it routed 11 to the replica; those 11 and all 20 sent to the replica’s host got 503 (bodies not recorded), while in RR09e, which ran next, the replica served 1,629 cold reads with 0 errors. A replica added after a 3.9 GB load answered setup 204 and never served in 45 minutes (RR09b run 1, cause not read); added to the empty primary in runs 2 and 3, it accepted its first session connection 181 s and 182 s after the setup call.
  • Around a move from Postgres 15 to 17 by logical replication (RR10, 2026-11-10, Team org, Small, ap-southeast-1, one run), the source kept its replica through the publication and a 4,000,000-row copy to each of two targets; the docs list deleting replicas as a prerequisite of the in-place upgrade.8 A target’s replica added to the empty project before its subscription accepted its first session connection 182 s after the setup call and followed the 3.9 GB copy; one added about 38 minutes after a finished copy got no pooler entry in 60 minutes. Both replicas that followed a large write logged No space left on device (hand read).
SituationChoiceWhy
Primary CPU high, workload under roughly 80% readsLarger compute“Read Replicas only serve reads and won’t help writes.”1
Read-heavy, users far from the primary’s regionReplica near the users, clients on the load balancer endpointgeo-routing sends each GET to the closest database1
Read-heavy, users near the primaryReplica in the primary’s region, clients on the load balancer endpointRR03h: the load balancer split GETs roughly half and half between a same-region primary and replica. Read-your-writes (corrected 2026-10-28; this cell said “not measured” until RR04): 0 misses in 456 replica-served reads straight after a POST, from a client whose POST round trip was 20.8 to 24 ms at p50 (RR04e-g); a closer client was not run, and a replica with stopped replay still gets about half the reads (RR04j)
API served through a custom domain that Auth must keep (OAuth, SAML)Auth on the custom domain; Data API reads on the load balancer endpoint, by a second client or a routing WorkerRR06e: every read through the custom host reached the primary; RR06f and RR07: both patterns put reads on the replica with Auth unchanged; RR09e-f (2026-11-09): 9,825 and 8,529 cold reads through the custom host, all served by the primary
Replica reads race frequent updates and VACUUM on the primaryhot_standby_feedback on, and watch dead tuples on the primaryRR08l: 0 snapshot conflicts against 436 and 288 at the defaults; VACUUM could not remove up to 26,500 and 26,000 dead tuples a pass, against 13,000 in both runs at the defaults
Analytical queries competing with the appReplica, the analytics job on the replica’s connection stringthe replica has its own pooler and database endpoint1
Region outage coverWarm standby, not a replicano promotion path is documented; see the DR tiers
Data must stay in one jurisdictionReplica only in an acceptable regiona replica is a full copy in its own region; see data residency
Long analytical query on the replicaKeep it under 30 s, or accept cancellationRR01: a conflicting primary command cancelled a held query with 40001 after 30.2 to 31.6 s with hot_standby_feedback off. With it on (RR08m), a 120 s replica transaction was not cancelled, and VACUUM on the primary could not remove 210,000 dead tuples by its fourth pass
A read must see the row just writtenRead it from the primaryon a replica whose replay is blocked, a new row was invisible for 30.2 to 31.3 s (RR01)
A large initial load or logical-replication copy is planned and a replica will followAdd the replica first, then load or subscribeRR09b: added after a 3.9 GB load, a replica answered setup 204 and never served in 45 minutes (one run, cause not read: a slow base backup, a disk change to 36 GB and different module code in run 1 are all open); added to the empty primary, it accepted its first session connection 181 s and 182 s after the setup call and the load streamed to it (runs 2 and 3). RR10 (2026-11-10, one run, 3.9 GB copies into two new 17.11 projects): a replica added to one empty target before its subscription accepted its first session connection 182 s after the setup call and followed the copy, and one added to the other target about 38 minutes after its copy finished got no pooler entry in 60 minutes (below)
Replica exists, its share of reads is near zeroFix the client path, or delete itevery hour bills at the primary’s compute size, outside credits and the spend cap3
Logs or API report showGETs served by the replica?Clients on the load balanceror replica endpoint? (groupedge_logs by request host)noIt is serving reads:keep it, watch lagyesReads sent as POST rpc?yesPoint Data API reads atthe load balancer endpointnoBehind a custom domain?noCall read-only functionswith get: trueyesReplica in another region and userscloser to the primary than to it?noKeep Auth on the custom domain;send Data API reads to the loadbalancer (second client or Worker)yesMove the replica towardthe users, or delete ityesSame-region replica: expect abouthalf the GETs (RR03h); checkchosen_supabase_region in the logsno

The same check as a list:

  1. Do the API logs or API Reports show GET requests served by the replica? If yes, it is serving reads; keep it and watch replication lag.
  2. If not, are the clients on the load balancer endpoint or the replica’s endpoint? If not, point Data API reads at the load balancer endpoint. To see which hostname the app calls, group the project’s edge_logs by request host (log_attributes['request.host']): RR09d found each request logged under the hostname the client addressed (below).
  3. Are the reads function calls sent as POST? If yes, call read-only functions with get: true.
  4. Is the Data API behind a custom domain? If yes, keep Auth on the custom domain and send Data API reads to the load balancer endpoint, by a second client or a routing Worker (below). Until 2026-10-28 this step said “send reads to the replica’s own endpoint”; that still reaches the replica, but only for GET, and the load balancer also takes HEAD and passes writes to the primary.
  5. Are the users closer to the primary than to the replica, with the replica in another region? If yes, move the replica toward the users or delete it.
  6. If the replica is in the primary’s region, expect roughly half the GETs on it (RR03h, two runs) and check chosen_supabase_region in the edge_logs rows (RR01o); a share far from that is worth a look at the client path.
Client(supabase-js, HTTP)API load balancerendpointPrimary API endpoint(project URL)Custom domainReplica APIendpointReplica pooler /database stringSQLPrimaryGET if closest;non-GET; AuthRead replicaData API GET,closest databaseno load balancerGET onlyreadsWAL: streaming +archived files

The same map as a table. “Documented” means the docs say it; “inferred” means it follows from the docs’ wording and was not measured; “measured” carries the RR01 id (2026-10-10; Tokyo primary, Singapore replica, one project, one run).

RequestWhere it goesStatus
Data API GET to the load balancer endpointthe closest database, primary includeddocumented;1 measured, RR01f and RR01h: replica for 40 of 40 from Singapore and for 4 of 8 Edge Function regions, primary for the other 4
Data API GET to the load balancer endpoint, primary and replica in one regioneither, about half eachmeasured, RR03h (2026-10-26, two runs): 111 / 89 and 94 / 106 replica / primary of 200 from Singapore; the docs do not describe two equally close databases. RR09e-f (2026-11-09, Team org, cold reads, 8 clients): 1,629 / 1,529 (RR09e) and 4,961 / 4,989 with four sequential scans on the primary (RR09f), replica / primary
Data API HEAD to the load balancer endpointeither nodemeasured, RR03g: HEAD with count=exact reached the replica 6 and 3 times of 10, the rest the primary, all 200; the replica’s own host refuses HEAD with 400. RR04d (raw HEADs): replica 5 and 2 of 10, all 200 with content-range
Data API POST to the load balancer endpoint, including POST /rest/v1/rpc/...primarydocumented;1 measured, RR01g: POST rpc/rr_whoami and a POST insert served by the primary; RR03f: every POST to five functions (5 calls each, two runs) served by the primary. PATCH, DELETE not run; an OPTIONS CORS preflight answered 200 on the load balancer, replica and primary hosts with the same method list (RR04d), which node answered it not recorded
rpc(fn, args, { get: true }) to the load balancer endpointsent as GET, so eligible for a replicadocumented;1 method choice read in the client source;2 the GET /rest/v1/rpc/rr_whoami it sends was measured (RR01f), and supabase-js 2.118.0 rpc(fn, {}, { get: true }) reached the replica for stable, security-definer and volatile read-only functions (RR03f)
Auth through the load balancer endpointprimary, alwaysdocumented;1 measured, RR02f and RR02k: 200 through the load balancer, the log names the primary, the replica’s host refuses 400
Storage, Realtimenot a replicadocumented;1 measured, RR02f: 200 and a Realtime join through the load balancer, the replica’s host refuses them; the node that served them is not in the log (primary inferred)
GraphQL (/graphql/v1) through the load balancer endpointrefusedmeasured, RR02f: 400 Load balancer does not handle POST requests for the path /gr... (and the GET form); the primary’s host answered 200 to POST (its GET form answered 404 PGRST202)
Edge Functions through the load balancer endpointansweredmeasured, RR02f: POST /functions/v1/<probe> 200; where it ran is not logged on that host
Data API GET to a replica’s own API endpointthat replica; the endpoint supports GET onlydocumented;1 measured, RR01e: HTTP 200 with pg_is_in_recovery() = true. RR03f-g: POST answered 400 Read replica does not handle POST requests for the path /res... (cut by the module) and HEAD answered 400. RR04d read the full texts: HEAD 400 text/plain with Content-Length 75, the length of the POST 400’s body Read replica does not handle POST requests for the path /rest/v1/rr4_where.; its CORS preflight still lists GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS,TRACE,CONNECT
Auth (/auth/v1/*) on a replica’s own API endpointrefusedmeasured, RR02f and RR03d: GET /auth/v1/user answers 400 with a non-JSON body, which supabase-js reports as Failed to parse JSON
Any request to a custom domainnot routed through the load balancer: the primarydocumented;1 measured, RR06e (2026-10-28, two runs): 200 of 200 anonymous GETs and 50 of 50 user-token reads served by the primary in each run. Until 2026-10-28 this row read “landing on the primary inferred”. RR09e-f (2026-11-09): 9,825 and 8,529 cold reads, all served by the primary
Any request to the primary’s project URLprimaryinferred: the API settings page lists the load balancer as a separate endpoint;1 RR01f: the 40 GETs sent straight to it were answered by the primary
SQL over the replica’s pooler or database connection stringthat replica, read-onlydocumented1

Each replica has its own database and API endpoints, and a project with replicas also gets an API load balancer endpoint, listed on the API settings page.1 The docs on routing, quoted:

The load balancer enables geo-routing for Data API requests to automatically route GET requests to the database closest to your user ensuring the lowest latency. You can also send Non-GET requests through this endpoint, and they are routed to the Primary database automatically.1

Due to the requirements of the Auth service, all Auth requests are handled by the Primary, even when sent over the load balancer endpoint.1

The routing rule changed on 2025-04-04, from round-robin “among all databases (all read replicas + primary) of your project, regardless of location” to geo-routing that “directs requests to the closest available database (all read replicas + primary)”.1 The primary is in that pool. Under geo-routing as documented, a replica takes a GET when it is the closest database to the caller (inferred: a replica farther than the primary takes none). The docs’ load balancer section does not say how it chooses between a primary and a replica in the same region; the page does say the load balancer “balances requests between your Primary database and Read Replicas” (read 2026-10-26).1 RR01 had no same-region case. The platform does accept a same-region replica: MS06 (2026-09-30) created one and it answered a read over its own pooler string 219 s after setup, and RR03h (2026-10-26) measured the split, below: roughly half the GETs to each node, per request. RR04h-k (2026-10-26) found the split at about half under 32 concurrent readers, under CPU loops on either node and with the replica’s replay stopped, and still sending reads to whichever node was down during a restart (below). RR09e-f (2026-11-09, Team org) found it at about half with reads that miss the cache: 1,629 of 3,158 to a replica answering at 308.3 ms p50 against the primary’s 64.7 ms, and 4,961 of 9,950 while four sequential scans kept the primary’s disk busy (below).

The load balancer exists only while a replica does. “If you remove all Read Replicas from your project, the load balancer and its endpoint are removed as well.”1 A client still pointed at the load balancer endpoint when the last replica goes has nowhere to send requests, so repoint it first: in RR02j the endpoint answered errors for at least 1,185 s after the remove call, 400 Load balancer does not seem to be configured properly. continuously from 70.7 s (run 2), and kept resolving (checked in run 2). RR09g (2026-11-09) was written to watch longer and was not run.

When the replica is behind, down or removed (RR02)

Section titled “When the replica is behind, down or removed (RR02)”

RR02 (replica-routing, 2026-10-23) repeated RR01’s shape twice, one throwaway Pro project per run: Small primary in ap-northeast-1, one Small replica in ap-southeast-1, a Singapore workstation for which the load balancer picks the replica. Each timed read was GET /rest/v1/rpc/rr_node with the anon key, a function returning which node ran it and stale_ms, the node’s clock minus the newest heartbeat row written on the primary every 250 ms. The load balancer, the replica’s own host and the primary’s own host were read in parallel, one request at a time each with a 5 s client timeout. “Lagging” means stale_ms above 2,000 ms, a threshold chosen for the module.

  • A replica whose replay has stopped keeps getting every read. A repeatable-read query held on the replica with pg_sleep(180) while the primary updated and vacuumed the same table stopped replay. Run 1 (max_standby_streaming_delay read 600000ms on the replica): the replica host was lagging for 174.6 s, and all 586 reads through the load balancer in that span were served by the replica, every one lagging, up to 176,772 ms stale. Run 2 (the replica still read the 30000ms default): the query was cancelled at 50 s, and all 98 reads in the 28.8 s span went to the replica. None went to the primary, and no read failed: a stale replica answers 200 with old data.
  • A replica that is down does not hand its reads to the primary. POST /projects/{ref}/restart restarted both nodes, primary first. While the replica was down and the primary up (about 65 to 100 s in run 1, 85 to 120 s in run 2) the load balancer failed every read in that span (21 and 29 failed reads across its failing span), mostly by the 5 s client timeout, with HTTP 521, HTTP 503 upstream connect error or disconnect/reset before headers and HTTP 503 PGRST002 among the rest, and sent none of its 334 and 415 reads across the restart phase to the primary. It recovered in the same 5 s bucket as the replica.
  • Removing the only replica leaves the load balancer endpoint answering errors. After POST read-replicas/remove (204) the load balancer’s first failure came about 1 s later, then HTTP 521, client timeouts and HTTP 400 Load balancer does not seem to be configured properly.; run 2 answered that 400 continuously from 70.7 s to the end of a 1,200 s watch, run 1 alternated it with HTTP 530 to the end of 360 s. It served 0 of 1,034 and 0 of 4,103 reads from the primary while the primary’s own host answered all 958 and 3,236 of its reads, and the name kept resolving once a minute throughout run 2.
  • Other products through the load balancer (run 1). Auth (/health, /settings, admin create user, password grant, GET /user), Storage (list, create bucket, upload, authenticated download) and a Realtime join with Postgres Changes answered as they do on the primary’s host, and the replica’s own host refused every one sent to it (400; Realtime ws error at handshake). The load balancer’s log names the primary for the Auth rows and carries no redirect identifier for Storage and Realtime, so where those ran is inferred (the primary’s services), not shown. GraphQL through the load balancer was refused 400 Load balancer does not handle POST requests for the path /gr... (the module cut the text), and the GET form likewise, while GraphQL on the primary’s host answered 200 to POST (its GET form answered 404 PGRST202). An Edge Function call answered 200 through it, with no edge_logs row on that host.
  • Not separated: a replica down while the primary and the load balancer config are untouched (the Management API has no per-replica restart; restart takes down both nodes), lag from write volume (one bulk insert filled the Small disk after 19.7 s without lagging the replica past 2,000 ms), and the load balancer’s rule itself. Two runs, one region pair, one vantage.

User tokens, keys and function calls on a same-region replica (RR03)

Section titled “User tokens, keys and function calls on a same-region replica (RR03)”

RR03 (replica-routing, 2026-10-26) ran twice, one throwaway Pro project per run: a Small primary in ap-southeast-1 with pitr_7 and one Small replica in the same region. Clients were the Singapore workstation (Cloudflare colo SIN) and Edge Functions invoked with x-region, on @supabase/supabase-js 2.118.0. Replica setup answered 204 on the first attempt, and the first session-pooler connection to the replica came 166 s and 170 s after the call. The load balancer host was <ref>-all again. Run 2 changed three things in the module (no signOut after sign-in, the order of nodes recorded per request, and a log poll that waits for the row total to stop growing); the rows below say where that matters. Figures are from the RUNLOG and the two artifacts.

The table rr3_docs had RLS on and one policy, for select to authenticated using (tenant_id = (select auth.uid())), with 3 rows for user A, 5 for user B and 2 for a third tenant. Both users were created and signed in on the primary’s host; their access tokens were ES256 with a kid and an iss of the primary’s host. Each read returned pg_is_in_recovery() to name the node, and edge_logs on the load balancer host was a second record of where each request went.

Each user read a security_invoker view over rr3_docs and a stable function through four client patterns on each host: a supabase-js client created with the accessToken option, a client with global.headers.Authorization, a client on which auth.setSession() was called, and raw fetch with the legacy anon key as apikey and the user’s token as Bearer.

ReadLoad balancerReplica hostPrimary host
user A, accessToken, header or raw3 rows, uid A, 0 of another tenant3 rows, replica, uid A, 0 of another tenant3 rows, primary, uid A, 0 of another tenant
user B, same5 rows, uid B, 0 of another tenant5 rows, replica, uid B, 0 of another tenant5 rows, primary, uid B, 0 of another tenant
anon key only0 rows, auth.uid() null, role anonthe same, on the replicathe same, on the primary

RLS and auth.uid() behaved the same on the replica as on the primary for an ES256 user token, in both runs; through the load balancer the node changed from read to read and the rows did not.

  • auth.setSession() on the replica’s host failed in both runs with Failed to parse JSON, because the replica host’s answer to GET /auth/v1/user was not JSON (RR02f recorded 400 for its other Auth paths; RR03 did not record the status). The read after it went out with the anon key as Bearer and returned 0 rows with no error. In run 2 the same call succeeded on the load balancer host and the primary host. Run 1’s setSession failed on the load balancer and primary hosts with Auth session missing! (status 400 on the supabase-js error object; edge_logs recorded HTTP 403 for the two load balancer attempts) and on the replica host with Failed to parse JSON as in run 2, because the module had signed out (signOut({ scope: "local" }) ends the session on the server); that was a module bug, not a platform finding.
  • signInWithPassword on a client created on the load balancer host worked in both runs; the token’s iss was the primary’s host, and that token read as user B on the replica’s host. On the replica’s host it failed with Failed to parse JSON.

GET rpc/list_docs_invoker with each header combination answered 200 on all three hosts in both runs, with the same role on each:

apikeyAuthorizationRole, rows seen
legacy anon JWT (HS256)the sameanon, 0
sb_publishable_noneanon, 0
sb_publishable_Bearer sb_publishable_...anon, 0
sb_publishable_ or legacy anon JWTuser A’s ES256 tokenauthenticated, uid A, 3
sb_publishable_ or legacy anon JWTuser A’s claims signed HS256 with the legacy JWT secretauthenticated, uid A, 3
legacy service_role JWTthe sameservice_role, 10
sb_secret_noneservice_role, 10

The HS256 token was minted by the module from user A’s claims with the legacy secret (jwt_secret from GET /v1/projects/{ref}/postgrest); an HS256 token issued by Auth itself was not tested, since new projects sign with ES256. supabase-js created with the publishable key sent it as both apikey and Bearer with no session, and the user’s token as Bearer with the accessToken option.

supabase-js on the load balancer host, user A by accessToken, 5 calls per function with rpc(fn, {}, { get: true }) (GET) and with rpc(fn) (POST). Counts are replica / primary:

FunctionGET, run 1GET, run 2POST, both runs
rr3_node (stable)1 / 41 / 40 / 5
list_docs_invoker (stable)3 / 22 / 30 / 5
list_docs_definer (stable, security definer)3 / 22 / 30 / 5
list_docs_volatile (volatile, reads only)1 / 42 / 30 / 5
touch (volatile, inserts a row)405 25006, 3 / 2405 25006, 3 / 20 / 5, HTTP 200
  • Routing followed the method; volatility and security definer did not change it: the volatile read-only function was served by GET on the replica as well as the primary, and every POST went to the primary, where touch wrote (rr3_touch went from 0 to 6 rows each run, 5 through the load balancer and 1 on the primary’s host).
  • touch by GET answered HTTP 405, SQLSTATE 25006, cannot execute INSERT in a read-only transaction, on the replica (in_recovery=t in the error detail) and on the primary (in_recovery=f). PostgREST runs a GET read-only on either node, so 25006 does not tell a client which node it reached.
  • list_docs_definer ran as postgres on both nodes and saw n 3 (filtered by auth.uid() inside the function) and all_rows 10 (the table owner is not subject to RLS), the same on the replica as on the primary.
  • On the replica’s own host every GET answered as above and every POST answered 400 Read replica does not handle POST requests for the path /res... (the module’s 60-character cut of a non-JSON body).

Through the load balancer, 10 calls each, replica / primary:

RequestRun 1Run 2
HEAD rr3_where, count=exact, in_recovery=eq.true6 / 4, all 2003 / 7, all 200
GET rr3_where, count=exact8 / 2, all 200, count 15 / 5, all 200, count 1
HEAD rr3_docs, count=exact, user A200, count 3, x10200, count 3, x10

supabase-js sends HEAD for select('*', { count: 'exact', head: true }). edge_logs agrees that the load balancer sent HEADs to both nodes: 9 and 6 to the replica, 11 and 14 to the primary, all 200. On the replica’s own host a HEAD answered 400 (text/plain, no content-range), while a GET with Prefer: count=exact there answered 200 with content-range 0-0/1. How the load balancer delivers a HEAD to a replica whose host refuses it was not looked at in RR03; RR04d (2026-10-26) looked from outside, below.

GET rpc/rr_whoami with the anon key through the load balancer, sequential:

Vantage (Cloudflare colo)Run 1 replica / primaryRun 2 replica / primaryRun 2 node switches / transitionsRun 2 longest run on one node
workstation, keep-alive, n = 200 (SIN)111 / 8994 / 10692 / 19914
workstation, Connection: close, n = 50 (SIN)not run28 / 2226 / 494
Edge Function x-region ap-southeast-1, n = 200 (SIN)100 / 100115 / 85108 / 1997
Edge Function x-region us-east-1, n = 50 (IAD)20 / 3027 / 2325 / 497
Edge Function x-region eu-west-1, n = 50 (DUB)26 / 2424 / 2621 / 496

0 errors in every row. edge_logs on the load balancer host read available regions ["SIN"] or empty (the artifact keeps the set of values, not the row), chosen region SIN for the SIN, IAD and DUB colos, and over all of a run’s load balancer rows 845 GETs to the primary and 813 to the replica in run 1, 841 and 860 in run 2.

  • With both databases in one region the load balancer spread GETs over the primary and the replica, roughly half each, from every vantage. In the cross-region shape (RR01f, RR02) the same workstation got 100 % replica. That fits geo-routing picking the region and a second step choosing a database inside it.
  • The order is not a strict alternation, which would switch at all 199 (or 49) transitions; run 2 switched at roughly half, about what independent 50/50 draws give. Inference: a choice per request, not tied to the client’s connection (the keep-alive row switched at 92 of 199 and the Connection: close row spread the same way; connection reuse was not recorded). The run cannot tell a random choice from another rule, and whether the weights move with load or health was not tested.
  • Latency from the workstation, keep-alive, run 2 medians: 20.9 ms when the primary served, 19.2 ms when the replica served.

A session-pooler connection on the primary inserted one heartbeat row every 20 ms for 300 s: 15,096 rows, 50 a second, 0 errors, both runs. Meanwhile GET rpc/rr_node (anon), with a 250 ms pause after each response on each host, returned stale_ms, the serving node’s clock minus the newest row’s written_at. A node that keeps up therefore reads up to the 20 ms insert period plus delay, and the two hosts’ clock skew sits inside every replica figure. pg_stat_replication.replay_lag was read on the primary every 5 s.

SourceRunnstale_ms p50p95max
replica host11,091172891
replica host21,092213099
primary host11,093122079
primary host21,083122128
load balancer (523 of 1,090 served by the replica)11,0901527122
load balancer21,0861729144

replay_lag read p50 2.2 ms, p95 2.4 ms and max 2.5 ms (n 61, run 1), and 2.1, 2.5 and 3.4 ms (n 59, run 2). 0 read errors on any host. At this write rate the replica’s median was 5 ms (run 1) and 9 ms (run 2) above the primary’s, with clock skew inside that difference.

Run 1’s edge_logs hold two load balancer GETs routed to the replica (redirect identifier) that answered 503, which none of the module’s results show, and run 2 has none. postgrest-js 2.118.0 retries a GET or HEAD answered 503 or 520 by default (fetchWithRetry, with an X-Retry-Count header),9 so those two were most likely retried by supabase-js and answered on the retry. The 503 bodies were not recorded. RR09d (2026-11-09) sent raw fetch GETs with no retry: the 11 of 20 that the load balancer routed to the replica got 503, as did 20 of 20 sent to the replica’s own host, and those bodies were not recorded either (below).

Not settled by RR03: a cross-region arm (RR01 and RR02 cover that shape); the load balancer’s rule inside a region, under load, with two replicas, or with one same-region node stale or down; read-your-writes through the load balancer in this shape, whose size at this write rate only the lag figures indicate; Auth-issued HS256 user tokens, third-party-auth tokens, and Realtime or Storage with a user token through the load balancer; why the replica’s host refuses HEAD while the load balancer delivers one to the replica. Cost was not metered: each run kept a Small primary, a Small replica and pitr_7 for about 10 and 11 minutes. RR04, later on 2026-10-26, measured four of those: read-your-writes, the split under load, a stale or down node, and the HEAD refusal.

The same-region load balancer under load, stall and restart (RR04)

Section titled “The same-region load balancer under load, stall and restart (RR04)”

RR04 (replica-routing, 2026-10-26) ran twice in RR03’s shape, one throwaway Pro project per run: Small primary in ap-southeast-1 with pitr_7, one Small replica in the same region, the Singapore workstation (chosen region SIN), supabase-js 2.118.0. Replica setup answered 204 on the first attempt and the first session-pooler connection to the replica came 182 s after the call in both runs. Other work ran on the same machine during both runs and run 2’s latencies are higher than run 1’s for every host, so latency is not compared across the runs. Figures are from the RUNLOG and the two artifacts.

Read-your-writes through the load balancer (RR04e-g)

Section titled “Read-your-writes through the load balancer (RR04e-g)”

Each try was a POST /rest/v1/rr4_ryw with Prefer: return=representation through the load balancer, which edge_logs shows always reached the primary, then, as soon as the response arrived, GET rpc/rr4_seen?p_id=<id> through the load balancer on the same keep-alive client. rr4_seen returns which node ran it and whether that row is visible there. A miss is a replica-served GET that did not see the row.

ArmRunReplica / primaryMissesPOST p50GET p50replay_lag p50, max
RR04e raw fetch, 200 tries1108 / 920 of 10821.6 ms20.8 ms2.3, 33.5 ms
RR04e2107 / 930 of 10721.4 ms23.4 ms2.5, 34.7 ms
RR04f supabase-js insert().select().single() then rpc(..., { get: true }), 50 tries125 / 250 of 2521.3 ms21.1 ms2.7, 5.3 ms
RR04f228 / 220 of 2822.6 ms23.5 ms2.4, 2.5 ms
RR04g as RR04e, primary taking 50 inserts/s on another connection193 / 1070 of 9320.8 ms20.1 ms2.4, 5.2 ms
RR04g295 / 1050 of 9524 ms26.8 ms2.5, 3.3 ms

0 errors in every arm and 0 misses of 456 replica-served reads over both runs. The likely mechanism, inferred and not separated: the client sends its GET only after the POST’s response has come back (about 21 to 24 ms at p50 from this vantage), and when rr4_seen ran on the replica the last replayed commit was already 29 to 31 ms old at p50 in RR04e and RR04f (replica clock minus the primary’s commit time, so clock skew is inside it), while replay_lag p50 was 2 to 3 ms (sampled once a second; its maximum, 33.5 and 34.7 ms in RR04e, sat above the POST p50 with no miss). Two things would make it false: a client much closer to the database than the replica’s replay time (an Edge Function or server in the same region; not run), or a replica whose replay has stopped, which still gets about half the reads (RR04j below).

The split under read load and CPU load (RR04h, RR04i)

Section titled “The split under read load and CPU load (RR04h, RR04i)”

GET rpc/rr_node with the anon key through the load balancer, back to back, 20 s per level:

ClientsRunRequests (per s)Replica / primaryReplica shareErrors
11876 (43.8)407 / 46946.5 %0
12587 (29.3)283 / 30448.2 %0
816,480 (323.6)3,233 / 3,24749.9 %0
823,966 (198.1)2,028 / 1,93851.1 %0
32122,536 (1,125.1)11,349 / 11,18750.4 %0
32217,074 (852.4)8,510 / 8,56449.8 %0

With one client the node switched at 411 of 875 (run 1) and 287 of 586 (run 2) transitions, the same order-less pattern as RR03h.

RR04i ran four session connections of a 60 s plpgsql busy loop on one node while one client read through the load balancer: the replica share during the load was 48.7 % and 49.7 % with the replica loaded and 50.3 % and 50.8 % with the primary loaded, 0 errors. The loops barely moved the loaded node’s REST latency (at most 4 ms at the median), so this shows the split does not follow four busy loops on a node; it does not show what happens when a node answers slowly, and the effect on CPU utilisation was not read. RR09e (2026-11-09, Team org, reads that miss the cache) had a slow node: the load balancer sent 1,629 of 3,158 requests to a replica answering at 308.3 / 762.1 ms p50 / p95 against the primary’s 64.7 / 87.3 ms (below).

The split while the replica’s replay is stopped (RR04j)

Section titled “The split while the replica’s replay is stopped (RR04j)”

pg_wal_replay_pause() on the replica as postgres answered 42501 permission denied for function pg_wal_replay_pause (both runs), so replay was stopped as in RR02h: a repeatable-read transaction on the replica holding a pg_sleep while the primary updated and vacuumed the same table, until the 30 s max_standby_streaming_delay cancelled it. A heartbeat row went in on the primary every 250 ms and rr_node was read every 250 ms on all three hosts; a read is stale when its stale_ms exceeds 2,000 ms, RR02’s chosen threshold.

Run 1Run 2
stops that held1 (the second cycle’s replica query was cancelled 0.1 s after the first’s and the third cycle never ran; the module was fixed for run 2)3
stale window on the replica host, max stale_ms28.1 s, 30,314 ms95.3 s (three stops and two catch-ups), 31,061 ms
load balancer reads in that window, replica (stale) / primary46 (46) / 56180 (160) / 163
first half / second half of the window, replica / primary27 / 24, 19 / 3292 / 80, 88 / 83
largest stale_ms served through the load balancer29,613 ms30,669 ms

0 errors. The load balancer kept sending about half the reads, 46 of 102 and 180 of 343, to a replica up to about 30 s behind, with a same-region primary available. This is RR02h’s result with an equally close alternative node.

POST /restart at +15 s while rr_node was read every 250 ms (5 s client timeout) on each host. The primary host failed from 17.2 to 78.8 s (run 1, 39 failures) and 17.4 to 95 s (run 2, 28); the replica host from 49.6 to 112.5 s (28) and 68.4 to 148.6 s (37). While only the primary was failing, the load balancer served 14 and 13 reads from the replica and failed 12 and 9; while only the replica was failing it served 21 / 27 and 24 / 20 replica / primary and failed 9 and 12 (a host that answered between its first and last failure counts as failing for that span, which is why replica-served reads appear there). edge_logs attributes the failures to both nodes (521 and 522 to the primary and the replica in both runs, 503 to the replica). The load balancer kept choosing a node that was down, either way round, as RR02i saw cross-region.

Raw HTTP/1.1 requests over TLS with the anon key, Connection: close, both runs, on the replica’s own host:

RequestStatusContent-TypeContent-LengthBody bytes
HEAD rr4_where (with or without Prefer: count=exact)400text/plain;charset=UTF-8750
POST rr4_where400text/plain;charset=UTF-87575
GET rr4_where, count=exact200application/json; charset=utf-82222
GET /auth/v1/health400text/plain;charset=UTF-87171
OPTIONS rr4_where (CORS preflight)200none00

The HEAD 400 and the POST 400 carry the same header names (sb-gateway-version, sb-request-id, sb-project-ref, sb-jwt-alg, sb-jwt-iss, server: cloudflare) and neither carries the x-envoy-*, content-range or content-profile headers of a 200. Inference: the 400 comes from the gateway layer in front of the replica’s REST service, before PostgREST, by the same rule that refuses POST; no response names the component. The preflight on the replica host lists GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS,TRACE,CONNECT, as on the other two hosts, including methods that host then refuses. Through the load balancer 10 raw HEADs reached the replica 5 and 2 times, all 200 with content-range. edge_logs holds one row per client request, under the host the client addressed (the replica host’s rows were exactly its two direct HEADs per run), so whether the forward skips the replica host’s front or passes a gateway that applies the method rule only to the replica’s hostname is not visible from outside.

Not settled by RR04: read-your-writes for a client closer than about 20 ms or against a replica that replays slower than the client’s round trip; the split when a node answers slowly at the REST layer (RR09e, 2026-11-09, had a replica answering at 308.3 ms p50 against 64.7 ms, and the load balancer still sent it 1,629 of 3,158 reads; a node slowed to the point of timing out is still open); two replicas, larger compute, other regions; a replica down while the primary is untouched (still no per-replica restart in the Management API). Cost was not metered: each run kept a Small primary, a Small replica and pitr_7 for about 14 and 16 minutes.

A custom domain with a replica (RR06, RR07)

Section titled “A custom domain with a replica (RR06, RR07)”

The docs say custom-domain requests skip the load balancer and point at “the dedicated endpoints provided in the dashboard”.1 They also say what activating a custom domain does to Auth: “OAuth flows will advertise the custom domain as a callback URL” and “SAML will use the custom domain instead”, which changes the project’s SAML EntityID.10 An app that has moved its OAuth and SAML providers onto the custom host keeps Auth there, and needs another route for reads.

RR06 (replica-routing, 2026-10-28, two runs) and RR07 (2026-10-28, runs 0 to 2) each used one throwaway Pro project per run: Small primary in ap-southeast-1 with pitr_7, one Small replica in the same region, the custom_domain add-on with a hostname in a Cloudflare-hosted zone, the Singapore workstation, supabase-js 2.118.0; RR07 also wrangler 4.147.0 and Playwright 1.63.0. RR07 run 0 stopped at the module’s own DNS wait (RR07d below); runs 1 and 2 passed 12 of 12. Figures are from the RUNLOG at 21c54ae (RR06) and c64837c (RR07) and the artifacts.

Reads through the custom host, and its tokens elsewhere (RR06e, RR06d)

Section titled “Reads through the custom host, and its tokens elsewhere (RR06e, RR06d)”

200 anonymous GET rpc/rr_whoami through the custom host were interleaved with 200 through the load balancer: the custom host’s were served by the primary 200 of 200 in each run, the load balancer’s split 105 / 95 (run 1) and 102 / 98 (run 2) replica / primary. 50 reads with a user’s token through the custom host: primary 50 of 50, each run. RR09e and RR09f (2026-11-09, Team org) repeated the custom-host arm with reads that miss the cache: 9,825 and 8,529 requests, all served by the primary (below).

User A signed in with signInWithPassword on a client whose URL was the custom host. The access token was ES256 with a kid, and its iss was the project host, https://<ref>.supabase.co/auth/v1, not the custom host. With an accessToken client on each host, 10 reads each, every read returned user A’s 3 rows, auth.uid() user A and 0 rows of another tenant: primary 10 of 10 on the custom host and the primary host, replica 10 of 10 on the replica host, and on the load balancer replica 6 and primary 4 (run 1), primary 8 and replica 2 (run 2). GET /auth/v1/user with the token answered 200 on the custom, load balancer and primary hosts.

Two clients: Auth on the custom domain, data on the load balancer (RR06f)

Section titled “Two clients: Auth on the custom domain, data on the load balancer (RR06f)”
import { createClient } from "@supabase/supabase-js";
// Auth on the custom domain: sign-in, refresh, OAuth and SAML stay there.
const authClient = createClient("https://api.example.com", PUBLISHABLE_KEY);
// Data API on the load balancer endpoint (API settings page), using the Auth client's token.
const dataClient = createClient(LOAD_BALANCER_URL, PUBLISHABLE_KEY, {
accessToken: async () =>
(await authClient.auth.getSession()).data.session?.access_token ?? null,
});
Run 1Run 2
50 reads before the refresh, replica / primary18 / 3226 / 24
5 rpc('rr6_touch') (POST, writes a row)primary 5primary 5
1 .insert()HTTP 201HTTP 201
refreshSession on the Auth clientok, token changedok, token changed
20 reads after the refresh, replica / primary8 / 1211 / 9
requests the data client sentGET 70, POST 6, all to the load balancerthe same

All 140 reads returned user A’s 3 rows, auth.uid() user A and 0 rows of another tenant, and the data client needed no reconfiguration after the refresh. The module did not log which token the data client sent after the refresh, and the old token was still valid, so the run does not show that the new token was picked up. dataClient.auth.getSession() threw Supabase Client is configured with the accessToken option, accessing supabase... in both runs; by inference the session lives in the Auth client only, and sign-in and refresh must be called there.

A routing Worker on the app’s own hostname (RR06g, RR07)

Section titled “A routing Worker on the app’s own hostname (RR06g, RR07)”

One hostname for the app, Auth and writes on the custom domain behind it, reads to the load balancer. The Worker the lab ran, worker/rr06-split.js, with READ_ORIGIN set to the load balancer URL and WRITE_ORIGIN to the custom domain:

A more complete implementation of this pattern - with health-checked replica fan-out, GraphQL read rewrite, read-your-writes, an append-only ingest spool, and an execute-only promotion control plane - is the edge read router, a Cloudflare Worker under the MIT licence.

export default {
async fetch(req, env) {
const u = new URL(req.url);
const read = (req.method === "GET" || req.method === "HEAD") && u.pathname.startsWith("/rest/v1/");
const target = new URL(u.pathname + u.search, read ? env.READ_ORIGIN : env.WRITE_ORIGIN);
const res = await fetch(new Request(target, req));
const h = new Headers(res.headers);
h.set("x-rr06-route", read ? "read" : "write");
return new Response(res.body, { status: res.status, statusText: res.statusText, headers: h });
},
};

It does no CORS handling of its own; the origin’s headers pass through. RR06g run 2 ran it on a *.workers.dev host with one supabase-js client: sign-in and refresh through it worked, 120 of 120 table reads returned the user’s 5 rows (replica 40 / primary 60 of 100 before the refresh, replica 13 / primary 7 of 20 after it), get: true calls split 10 / 10, and 5 of 5 POST writes reached the primary. RR07 put the same file on a Workers Custom Domain in the app’s zone (wrangler deploy --domain):

WhatRun 1Run 2Module
A record on the zone’s nameservers and on 1.1.1.1, after wrangler deploy exited3 s5 sRR07d
rpc/rr_whoami answered through the Worker3 s6 sRR07d
50 interleaved anonymous GETs, p50 / p90 through the Worker34.9 / 60 ms55.8 / 88.9 msRR07e
the same straight to the load balancer33.3 / 63.9 ms35.5 / 67.9 msRR07e
p50 through the Worker minus p50 direct1.6 ms20.3 msRR07e
CORS headers through the Worker against the custom host (preflight, actual) and the load balancer (actual), three requests9 of 9 identical9 of 9 identicalRR07f
headless Chromium on another origin: sign-in, a read of 5 rows, a POST rpc, through the Worker and the custom hostall 200, 0 console errorsthe sameRR07g
OAuth session through the Worker: 30 reads (20, refresh, 10), replica / primary; 3 POST rpc15 / 15; primary 312 / 18; primary 3RR07l
  • DNS. Run 0’s wait never saw the record within its 8 minute budget. An ad-hoc probe after it (not in an artifact) found a Worker deployed the same way to a fresh name on the zone’s nameservers within seconds by dig, while a Bun Resolver instance that had asked before the record existed kept returning ENOTFOUND. Runs 1 and 2 used a new resolver per query and asked 1.1.1.1 first. RR06 run 1 (2026-10-28) had failed the same way on its Worker host, and its RUNLOG first put that down to the workstation’s resolver caching the miss for the zone’s SOA minimum of 1800 s; RR07 revised it, by inference, to the in-process cache of the miss. A deploy script that checks the hostname should not reuse a resolver that saw the miss.
  • Latency. The two runs disagree, 1.6 ms and 20.3 ms at p50; the figure includes whatever Cloudflare location and connection reuse each path got, which the runs did not separate from the Worker itself.
  • CORS. Preflights answered 200 with Access-Control-Allow-Origin: * and Access-Control-Max-Age: 3600; actual responses reflected the request’s origin, and only POST /auth/v1/token added Access-Control-Allow-Credentials: true. The Worker sent every OPTIONS to the custom host, including the preflight for a GET whose actual request went to the load balancer. The actual REST GET reflected the origin with Vary: Accept-Encoding only, so a cache in front of it keyed without the origin could hand one origin’s header to another (inference; the Worker does not cache).

OAuth and SAML through the Worker (RR07h-k, RR07m)

Section titled “OAuth and SAML through the Worker (RR07h-k, RR07m)”

OAuth used a mock OIDC issuer in the Keycloak provider slot and the PKCE flow in supabase-js (flowType: "pkce", signInWithOAuth with skipBrowserRedirect, then exchangeCodeForSession), the module playing the browser. Both runs gave the same result:

Flow entered atredirect_uri sent to the issuerCode exchange
the Worker host (RR07h)<custom-host>/auth/v1/callbackok, through the Worker
the custom host (RR07i)<custom-host>/auth/v1/callbackok
the project host (RR07j)<custom-host>/auth/v1/callbackok
the Worker host, callback request sent to the Worker host (RR07k)<custom-host>/auth/v1/callbackok, through the Worker

The Auth server named the custom host as the callback whichever host the flow entered at, the Worker host included, so the provider registers https://<custom-host>/auth/v1/callback. The token’s iss was the project host each time. RR07k shows the callback also works when it arrives through the Worker; a real provider sends the browser to the redirect_uri it was given, so it would not go there unprompted. The mock issuer checks no redirect_uri, so a provider’s own mismatch check was not exercised.

SAML (PATCH config/auth {saml_enabled: true} 200 and provider create 201 on the Pro org, both runs) used a lab IdP that signs the Response itself. SP metadata fetched through the Worker, the custom host and the project host gave the same entity ID <custom-host>/auth/v1/sso/saml/metadata and ACS <custom-host>/auth/v1/sso/saml/acs. An ACS POST sent to the Worker host and one sent to the custom host each answered 302 to the site URL with a code, the exchange through the Worker worked, and 10 of 10 reads per run through the Worker returned the SAML user’s 2 rows (primary 5 and replica 5, primary 6 and replica 4). The IdP is the test itself: this says the Auth server accepted a well-formed Response through the Worker, not that a vendor IdP interoperates.

Not settled by RR06 and RR07: a real provider’s redirect_uri and ACS registration checks; browser fetches with credentials: "include", and Realtime, Storage and Functions through the Worker; the hop’s cost beyond two runs from one vantage; the data client across a token expiry without an explicit refresh; other regions, a second replica, load beyond one request at a time. Cost was not metered: each RR06 run kept a Small primary, a Small replica, pitr_7 and the custom_domain add-on for about 15 and 9 minutes, each RR07 run about 8 minutes (run 0 about 14).

Cold reads, a busy primary disk and edge_logs per hostname (RR09)

Section titled “Cold reads, a busy primary disk and edge_logs per hostname (RR09)”

RR01 to RR08 ran on a Pro org, with tables the RUNLOG describes as fitting in memory. RR09 (replica-routing, 2026-11-09) ran on a Team org (org_plan team in every run), three throwaway projects, one per run, the same day: a Small primary in ap-southeast-1 with pitr_7, the disk grown to 24 GB before any data (303, 302 and 302 s after the call), one Small replica in the same region, and rr9_cold, 4,000,000 rows of about 1 KB: 3.81 GB of heap and 3.9 GB total relation size, on PostgreSQL 17.11 with shared_buffers 512MB. The compute docs give Small 2 GB of memory (documented, not measured).11 Run 3 added the custom_domain add-on with a hostname in a Cloudflare-hosted zone; the vantage was the Singapore workstation. Run 1 stopped at the replica (below), run 2 probed for the load balancer once and recorded it as not found, and run 3 ran every arm but the removal watch, so every figure below except the replica build is from run 3. In run 3 <ref>-all.supabase.co answered at the first probe and the Dashboard route answered the PAT 401, as in RR01e. Figures are from the RUNLOG and the run 3 facts.

Run 3’s order: replica (first session connection 182 s after the setup call), load (183 s), load balancer lookup, custom domain (verified 149 s after the DNS writes, serving rr_whoami 11 s after the activation wait ended; whether that wait ended on 5_services_reconfigured or on its 15-minute cap is not recorded), RR09d’s tagged GETs, RR09e, RR09f, then RR09d’s log read. No step waited for the replica after the load, and nothing measured its lag or replay.

What edge_logs record per hostname (RR09d)

Section titled “What edge_logs record per hostname (RR09d)”

Twenty raw fetch GETs of rr_marker with a tag=eq.rr9-<host> filter went to each of four hosts, and the project’s edge_logs were grouped by log_attributes['request.host'], query string, method, status and load_balancer_redirect_identifier through the Management API logs endpoint. The log read came 595 s after the first tagged GET, with RR09e and RR09f in between.

Sent toStatus at the clientLogged hostRedirect identifierRows
custom host200 x20the custom hostnone20
project host200 x20the project hostnone20
replica host503 x20the replica hostnone20
load balancer (<ref>-all)200 x9, 503 x11<ref>-allthe primary (9, all 200); the replica (11, all 503)20

80 rows for 80 requests, in 5 groups. Each request was logged under the hostname the client addressed, the custom host under its own name, and only the load balancer’s rows carried a redirect identifier, which named the node the request was sent to. Grouping a project’s edge_logs by request host therefore shows which hostnames its clients call: the load balancer, a replica host, the project host or a custom domain.

Every 503 was on a request routed to the replica: all 20 sent to the replica’s host and the 11 that the load balancer sent to it. The response bodies were not recorded, so which layer answered 503 is not known. The load balancer kept routing reads to the replica all the same. RR02h and RR04j saw the same routing to a lagging replica, but those replicas answered 200 with stale rows, not 503. The GETs ran after the load, the load balancer lookup and the custom domain setup, with no wait for replay. That the replica was still busy with the load is inference from its disk reads in RR09e; lag was not measured.

Cold reads through the custom host and the load balancer (RR09e)

Section titled “Cold reads through the custom host and the load balancer (RR09e)”

Each request was GET rpc/rr9_cold_read?n=50, a volatile plpgsql function doing 50 random primary-key lookups in rr9_cold, called by GET; 8 concurrent clients for 90 s per arm, with disjoint key ranges per arm. The node is pg_is_in_recovery() in each response. blks_read and blks_hit come from pg_stat_database on each node before and after the arm (12 s settle), and node_disk read bytes from each host’s metrics endpoint.

ArmRequestsServed primary / replicams p50 / p95, primaryms p50 / p95, replicablks_read primary (miss %)blks_read replica (miss %)node_disk read MB, primary / replica
custom host, keys 1 to 1,000,0009,8259,825 / 066.2 / 120.4none274,027 (13.9)not read2,301.5 / 3,970.9
load balancer, keys 1,000,001 to 2,000,0003,1581,529 / 1,62964.7 / 87.3308.3 / 762.160,294 (19.6)58,754 (17.5)512.7 / 2,492.8

0 errors in either arm. A cache-hot probe after the arms, 100 sequential rpc/rr_whoami through the load balancer: replica 52, primary 48; p50 38 ms on the primary, 38.8 ms on the replica.

  • Through the custom host the primary served all 9,825 requests and the replica none, so every buffer miss those reads caused was the primary’s. Through the load balancer the requests split 1,529 / 1,629 and the buffer misses 60,294 / 58,754, a replica share of 49.4 %.
  • The load balancer sent 1,629 of 3,158 requests to a replica answering at 308.3 / 762.1 ms p50 / p95 against the primary’s 64.7 / 87.3 ms, while the replica’s disk read 2,492.8 MB against the primary’s 512.7 MB. The arm completed 3,158 requests against the custom arm’s 9,825, which fits half of them waiting on the slower replica (inference).
  • Two readings in the custom arm are not clean. The replica’s blks_read cell was recorded as -1: the before or after read over a fresh session connection threw, or a counter went backwards, and the artifact does not say which. Its node_disk counter rose 3,970.9 MB while it served no request. That fits replay of the load’s WAL, and so do its slow answers in the load balancer arm; both are inference, since nothing measured lag or replay.
  • blks_read counts shared-buffer misses, OS page-cache hits included; with 3.81 GB of heap against 2 GB of memory, most misses reaching the disk, not all, is inference. The RUNLOG treats the node_disk figures as approximate at a 90 s arm.

Cold reads with a busy primary disk (RR09f)

Section titled “Cold reads with a busy primary disk (RR09f)”

Four session-pooler connections to the primary looped select count(*) from public.rr9_cold where length(pad) > 0 with synchronize_seqscans off, starting 30 s before the arms. Over the 212 s between their first and last readings the primary’s blks_read rose 14,208 a second (buffer misses, all backends) and its node_disk read 103.5 MB/s. That window also held both arms’ point reads and the hot probe, so neither figure is the scans’ alone. 8 full scans completed, and at the end pg_cancel_backend was called on 6 backends named rr9_hog (the 4 sessions; the other 2 probably parallel workers, not checked). No disk ceiling, utilisation or iowait was read: the disk was busy; its saturation was not measured.

ArmRequestsServed primary / replicams p50 / p95, primaryms p50 / p95, replicablks_read primary (miss %)blks_read replica (miss %)node_disk read MB, primary / replica
load balancer, keys 2,000,001 to 3,000,0009,9504,989 / 4,96176.8 / 102.262.7 / 89.12,136,299 (53.4)145,633 (14.6)12,101.8 / 1,966
custom host, keys 3,000,001 to 4,000,0008,5298,529 / 081 / 115.4none869,785 (32.1)12 (1.7)9,804.5 / 118

0 errors in either arm. A cache-hot probe under the scans, 100 rpc/rr_whoami through the load balancer: replica 55, primary 45; p50 44.8 ms on the primary, 37.8 ms on the replica.

  • With the scans running, the load balancer split 4,989 / 4,961 primary / replica; it did not move reads off the primary. The primary’s blks_read and node_disk columns include the scans, so the 6.4 % replica share of blks_read in that row is not a request split.
  • Point reads on the primary: p50 rose on both paths, 64.7 to 76.8 ms through the load balancer and 66.2 to 81 ms through the custom host; p95 rose through the load balancer (87.3 to 102.2 ms) and fell through the custom host (120.4 to 115.4 ms). One run per arm, on different key ranges. That the scans were bound by throughput and so slowed point reads only this much is inference. A node slowed to the point of timing out was not tested.
  • The replica answered at 62.7 / 89.1 ms here against 308.3 / 762.1 ms in RR09e. With no lag measurement, that fits it having finished whatever kept its disk busy in RR09e (inference).

A replica added after a large load (RR09b)

Section titled “A replica added after a large load (RR09b)”

Run 1 loaded the table first (4,000,000 rows in 192 s), then called read-replicas/setup: HTTP 204, and the replica never accepted a session connection in the module’s 45-minute wait. During that wait a hand read of GET /config/disk (not in the artifact) showed the primary’s volume at 36 GB, last_modified_at 07:52:12 UTC, against the 24 GB the module set. Why the replica never served was not read: a base backup of a 3.9 GB primary outlasting 45 minutes on Small and an interaction with the disk change are both open, and run 1 also ran different module code (lab commit 8168540) from runs 2 and 3. Runs 2 and 3 added the replica to the empty primary; the replica accepted its first session connection 181 s and 182 s after the setup call, and the runs then loaded the table (205 s and 183 s), so the load streamed to the replica; both replicas served. One failure with an unread cause against two successes: adding the replica before a large load worked twice, and the runs do not show that adding it afterwards always fails. The RR09b title in the run 2 and run 3 facts still reads “(built after the load)”, text left from run 1; in both runs the replica came first and RR09a2 records the load after it. Facts: run 1, run 2, run 3.

Not settled by RR09: the removal watch RR09g, which was written and not run (runs 1 and 2 stopped at RR09b; run 3 ran with PVLAB_RR9_PHASES=logs,cold,hog, which the artifact does not record), so RR02j’s 1,200 s stays the longest watch; a wait for the replica’s replay before the arms, or any lag measurement; more than one run of any arm; any size but Small and any region but ap-southeast-1; the 503 response bodies; why run 1’s replica never served. Cost was not metered: run 3 kept a Small primary, a Small replica, pitr_7, a 24 GB volume and custom_domain for 24 minutes; run 1 kept a Small primary, pitr_7, the grown volume and a replica whose setup returned 204 but never served, for 54 minutes; run 2 kept everything but the custom domain for 12.

Replicas around a logical-replication move (RR10)

Section titled “Replicas around a logical-replication move (RR10)”

RR10 (replica-routing, 2026-11-10, one run) asked what happens to read replicas when a database moves from Postgres 15 to 17 by logical replication into a new project: whether the source’s replica has to go, and whether the new project’s replica goes in before the initial copy or after every table is synced. Three throwaway projects on the Team org, each Small in ap-southeast-1 with pitr_7 and the disk grown to 24 GB before any data: source S created with postgres_engine: "15" (15.19), targets A and B on the default (17.11). The table rr10_t held 4,000,000 rows of about 1 KB, 3.9 GB total relation size. S got a replica while empty, then the load and a publication; A got a replica while empty, before any subscription; A and B then subscribed at the same time over S’s direct connection on 5432; B got its replica only after its copy had finished. “Served” in this section means what the module checked: a READ_REPLICA entry in the pooler config and a session connection through it. No Data API request went to any replica. The module recorded 3 pass and 3 fail. While RR10e waited, the three projects were read by hand through the Management API query, logs and backups endpoints; those lines are marked “hand read” and are not in the run artifact. Figures are from the RUNLOG, the facts and the hand reads.

The source’s replica through publication and copy (RR10b, RR10d)

Section titled “The source’s replica through publication and copy (RR10b, RR10d)”

S’s replica, set up while S was empty, accepted its first session connection 170 s after the setup call. The load then took 130 s and the publication answered 201. Both create subscription calls answered 201 with S’s replica attached, S logged the start of logical decoding for both subscriptions’ slots at 09:33:03 UTC (hand read), and both targets received all 4,000,000 rows. In this run the logical path did not need the source’s replica removed. The upgrading docs list deleting replicas among the in-place upgrade’s prerequisites: “Projects with read-replicas can’t be upgraded. You need to delete the replicas and re-create them after upgrade completes.”8

The run did not show S’s replica keeping up. pg_stat_replication through the query endpoint returned no standby row on S right after the load, so the module’s lag read is -1 there; at least one RR10d sample saw a standby row on S, with lag at most 0 bytes. S’s replica logged No space left on device before the subscriptions were created (below), and its rows were not counted.

A target replica added before the subscription (RR10c, RR10d)

Section titled “A target replica added before the subscription (RR10c, RR10d)”

A’s replica, set up while A was empty and before any subscription, accepted its first session connection 182 s after the setup call. Over the module’s 40-minute sync wait (156 samples, about every 15 s, from the subscriptions to 10:13:15 UTC), pg_stat_replication on A put that replica’s lag at up to 81,396,272 bytes and, separately, 17,970 ms. After RR10d, A held 4,000,000 rows and so did A’s replica; B held 4,000,000.

A’s own subscription did not finish. Its table never reached r in pg_subscription_rel within the module’s 40-minute bound, and 30 s after 1,000 more rows were written on S (RR10f, the last read before teardown) A and A’s replica still held 4,000,000 while B held 4,001,000. The RUNLOG traces that to A and B subscribing at the same time, which the pgmig reference covers. A’s replica followed what A received; no target in the run had both a replica added first and a finished sync.

A target replica added after the copy (RR10e)

Section titled “A target replica added after the copy (RR10e)”

B’s replica was set up at about 10:13 UTC, about 38 minutes after B’s copy finished (every table r by the 108 s sample). Setup answered 204, and no READ_REPLICA entry appeared in the pooler config in the 60-minute wait: the module checked about every 15 s, and the 12 checks the artifact records, from 0 s to 3,310 s, all show none. GET /database/backups listed 0 completed physical backups on B before the setup and after the wait. A hand read at 10:48 UTC showed pitr_enabled true, walg_enabled true, an empty backups list and a physical_backup_data pair of 09:09:48 and 10:14:42 UTC; the first is before the run started, and what the pair describes was not read.

With RR09b run 1 (above: added after a 3.9 GB load, never served in 45 minutes, pooler entry not recorded), that is two replicas added after a load or copy of 3.9 GB that never served, and four added to an empty primary that did (RR09 runs 2 and 3, RR10b, RR10c). Why the late ones stalled was not read from outside. Those are six replicas, all Small in ap-southeast-1; they do not show that a replica added after a copy always fails.

Disk-full lines on the replicas that followed a large write

Section titled “Disk-full lines on the replicas that followed a large write”

Both replicas that followed a large write logged No space left on device while their primaries had 24 GB disks, and their postmaster then logged terminating any other active server processes (hand read from the projects’ Postgres logs):

ReplicaUTCProcessLine
S’s replica (RR10b)09:29:54startupcould not extend file "base/5/17617.3": No space left on device
S’s replica (RR10b)09:29:54postmasterterminating any other active server processes
A’s replica (RR10d)09:35:09startupcould not extend file "base/5/17643.3": No space left on device
A’s replica (RR10d)09:35:09walreceivercould not write to file "pg_wal/xlogtemp.5430": No space left on device
A’s replica (RR10d)09:35:09postmasterterminating any other active server processes

A’s replica later held 4,000,000 rows (RR10d); S’s replica’s rows were not counted. No Management API endpoint the run used returned a replica’s disk size. The usage docs size a replica’s disk at 1.25x the primary’s;3 whether these replicas had that, and whether a replica’s disk follows a manual resize of its primary, was not read. The RUNLOG’s reading that it does not follow is inference.

Not settled by RR10: subscriptions created one after another; a target whose replica came first and whose sync then finished; a replica added after a completed physical backup that includes the data (the backups list held no completed physical backup at any read); why B’s replica never served; any size but 3.9 GB, any compute but Small and any region but ap-southeast-1; the replicas’ disk sizes; what pg_stat_replication shows for Supabase standbys in general (no row on S right after the load, a row at some RR10d sample); Data API reads on any of the three replicas; more than one run. Cost was not metered: the run, 09:17:41 to 11:14:04 UTC, kept three Small projects with pitr_7 and 24 GB disks, replicas on S (set up after RR10a) and A (set up after RR10b) until teardown, and B’s replica setup (204, never served) from about 10:13 UTC.

Setup: Pro org, one project, primary in ap-northeast-1 on Small compute with pitr_7, one replica in ap-southeast-1, run on 2026-10-10 (module RR01, RUNLOG). The probe is GET /rest/v1/rpc/rr_whoami, the request get: true sends. The function is stable and returns pg_is_in_recovery() and pg_postmaster_start_time(), which say which node answered.

The Management API returned neither the load balancer’s host nor the replica’s REST host. GET /platform/projects/{ref}/load-balancers, the route the Dashboard calls, answered a personal access token with 401 {"message":"Unsupported access token"} (RR01e). The replica answered at <identifier>.supabase.co, where identifier is the field of the READ_REPLICA entry in the pooler config. The load balancer answered at <ref>-all.supabase.co, which the run found by trying candidate names, so the name is observed and not documented. Read the load balancer endpoint from the API settings page.

RR01f, 40 GETs per target, interleaved. The load balancer served 40 of 40 from the replica. Median latency matched the replica’s:

TargetMedian latency
Primary’s own endpoint117.5 ms
Replica’s own endpoint46.3 ms
Load balancer46.5 ms

A POST to rpc/rr_whoami through the load balancer (stable function, no get: true) answered 200 from the primary, and a POST insert answered 201 and was readable on the primary (RR01g). Response headers on the load balancer path carry no node identifier.

RR01h1 to RR01h8, 10 GETs per region. Pinning is described in Edge Function limits.

x-regionServed by
ap-northeast-1primary, 10 of 10
ap-southeast-1replica, 10 of 10
ap-southeast-2replica, 10 of 10
ap-south-1replica, 10 of 10
sa-east-1replica, 10 of 10
eu-west-1primary, 10 of 10
us-east-1primary, 10 of 10
us-west-1primary, 10 of 10

RR01o. Reading edge_logs through the Management API logs endpoint (query guide) returned 152 load balancer rows. They carry request.cf.colo, load_balancer_geo_aware_info.available_supabase_regions (["NRT","SIN"] here), load_balancer_geo_aware_info.chosen_supabase_region (on 151 of the 152) and load_balancer_redirect_identifier (on all 152). The docs name the last as metadata.load_balancer_redirect_identifier;1 in this query it is a log attribute of that name, <ref>.supabase.co for the primary and <ref>-rr-<region>-<5 chars>.supabase.co for the replica. Chosen region followed the Cloudflare colo in all 9 groups of rows that carried one:

request.cf.coloChosen regionServed byRows
SIN (the workstation)SINreplica71
SIN (Edge Function)SINreplica10
SYD, BOM, GRUSINreplica10 each
NRT, DUB, IAD, SJCNRTprimary10 each

The one POST row has no geo fields and the primary’s identifier. The run cannot separate a distance rule from a fixed colo table, since both fit these 8 colos. Either way the only input shown is the Cloudflare colo where the request enters; nothing here shows the client’s address or measured latency mattering, so a client on another network path can enter at another colo.

Not run in RR01: Auth, Storage, Realtime and Edge Function paths through the load balancer, a custom domain, HEAD, OPTIONS, a second replica or primary region, load, and whether the load balancer keeps sending GETs to a replica whose replay is stalled (the conflicts below ran after the routing probes). RR02 ran the product paths and the stalled replica (above).

PostgREST runs GET and HEAD in a READ ONLY transaction: “Modifying the database inside READ ONLY transactions is not possible. PostgREST uses this fact to enforce HTTP semantics in GET and HEAD requests.”12 A function call over POST runs read-write when the function is VOLATILE and read-only when it is STABLE or IMMUTABLE, but either way it is a non-GET request and the load balancer sends it to the primary.121 The docs’ fix is the client option:

To call a read-only Postgres function on Read Replicas through the REST API, use the get: true option.1

// POST /rest/v1/rpc/top_products - always the primary
const a = await supabase.rpc("top_products", { lim: 20 });
// GET /rest/v1/rpc/top_products?lim=20 - eligible for a replica
const b = await supabase.rpc("top_products", { lim: 20 }, { get: true });

The supabase-js reference shows the option as “Call a read-only Postgres function” and the client’s own doc comment says that with get: true “the function will be called with read-only access mode”.132 In the postgrest-js source, get: true sets the method to GET and moves each argument into the query string: arrays become {a,b} literals and any other value goes through JavaScript string conversion, so an object argument would arrive as [object Object] (source read at commit 84e2c5d, not run).2 RR03f called the option itself on supabase-js 2.118.0: get: true calls reached the replica on 1 to 3 of 5 calls per function with both nodes in one region, and the plain rpc() calls never did. Volatility did not decide routing: a volatile function that only reads was served by the replica under GET.

  • The function must not write. A function that writes (inserts, updates, or calls nextval()) fails under GET, because GET runs READ ONLY; the PostgREST docs’ example, a view calling nextval(), answers HTTP 405 with SQLSTATE 25006, “cannot execute nextval() in a read-only transaction”.12 RR03f (2026-10-26) measured the same through the load balancer: a volatile function that inserts answered 405 25006 under get: true on the replica and on the primary alike, so the error does not show which node answered.
  • Keep get: true for scalar and array arguments. PostgREST matches GET parameters to function parameters by name, ?a=1&b=2.14

The Securing your API page states the same split from the rate-limiting side: “GET and HEAD requests run in read-only mode. They can be served by Read Replicas, which don’t support writing to the database.”15

The usage docs describe a replica as “a dedicated database” whose resources are “mirrored from the primary database”.3

ResourceWhat the replica getsBilling
Compute“the same Compute size as the primary database”3by the hour; a partial hour bills as a full one3
Disk size“1.25x the size of the primary disk to account for WAL archives”3from the first byte; the plan’s included disk does not cover it43
Provisioned disk IOPSinherits any additional IOPS3as for the primary
Provisioned disk throughputinherits any additional throughput3as for the primary
IPv4 add-onone per replica if the primary has one316“Each replica adds to the total IPv4 cost.”16

On the invoice, replica compute is its own line, “Replica Compute Hours”; “Disk Size, Disk IOPS, Disk Throughput and IPv4 are not shown separately for Read Replicas and are rolled up into the project.”3 Searching the invoice for the replica’s disk will not find it.

Two exclusions apply: no credits offset it, and no spend cap limits it. “No, Compute Credits do not apply to Read Replica Compute.”3 Paid plans include $10 a month in compute credits, “enough to cover one Micro instance”,17 and they “apply only to Compute and do not cover other line items, including Read Replica Compute and Branching Compute”.5 And “Read Replicas are not covered by the Spend Cap”: Read Replica Compute sits on the cost-control page’s list of usage the cap excludes.318

Compute per replica, at the monthly prices on the public pricing page (doc-read 2026-10-08). Projects below XL can have up to two replicas, XL and above up to five.19

Primary computeReplica compute per monthReplicas allowed
Small$15up to 2
Medium$60up to 2
Large$110up to 2
XL$210up to 5
2XL$410up to 5
4XL$960up to 5
8XL$1,870up to 5
12XL$2,800up to 5
16XL$3,730up to 5

Monthly prices from the pricing page;17 the usage docs’ own examples quote Large at $111 for 730 hours.3 Micro and Nano are absent because a replica needs Small or larger.19

The docs’ smallest worked example, quoted line for line: a Pro project on Small with one replica and no add-ons bills Pro Plan $25, primary compute $15, primary disk 8 GB $0, replica compute $15, replica disk 10 GB $1.25, subtotal $56.25, Compute Credits -$10: $46.25 a month.3 The credits cannot apply to the replica’s compute, so the replica is $16.25 of that, none of it offset. The same page’s second example, two Large replicas with IPv4 and provisioned IOPS and throughput, totals $427.06.3

A resize moves the replicas with the primary. When the primary’s compute changes, the primary restarts first while the replicas stay available, then “all the Read Replicas are restarted (and resized, if needed) concurrently”.19 The compute cost of an upsize therefore multiplies by one plus the replica count.

The docs list four requirements on top of a Pro, Team or Enterprise plan: the project runs on AWS, on “at least a Small compute add-on”, on Postgres 15 or later, and not on legacy logical backups.19 General regions (the Americas, Europe and APAC groupings) “aren’t yet supported for read replicas”; a project needs a specific region.20

The lab hit the compute floor and the backup requirement in order on a fresh Pro project (sfp-platforms S07/S07e, 2026-08-25):

StepResponse from POST /v1/projects/{ref}/read-replicas/setup
Fresh project on the default Micro400 "Read replicas require a minimum size of small"
After a ci_small upgrade406 "Failed to check for latest completed physical backup"
After enabling the pitr_7 add-on (physical backups)204 accepted

MS06 (2026-09-30) skipped the chain on a Medium primary in ap-southeast-2, with the replica in the primary’s own region: it added pitr_7 first (HTTP 200), then setup answered 204 on the first attempt; the replica’s READ_REPLICA entry appeared in the pooler config after 216 s, and a connection through the replica’s Supavisor string answered pg_is_in_recovery() = true after 219 s. Removal answered 204 and the entry was gone on the first poll. The docs say replicas deploy “across multiple regions”1 and do not mention the same-region case.

RR01 (2026-10-10) timed a cross-region replica on a Small primary: ap-northeast-1 primary with ci_small and pitr_7 applied, replica in ap-southeast-1. Setup answered 204 on the first attempt. The READ_REPLICA entry appeared in the pooler config and answered pg_is_in_recovery() = true on its first connection, both at 271 s (RR01d). Two exploratory runs on the same shape read roughly 150 s from a console log that was not kept, so no artifact backs that figure. Treat 271 s as the published figure, not a distribution, and do not set it against MS06’s 216 s: the compute size and the region pair differ, and each is one run. Removal answered 204, the entry was gone from the pooler config on the first poll (0 s), and the project delete answered 200 (RR01p).

RR09b (2026-11-09) added a same-region Small replica on a Team org, to a Small primary with pitr_7 and a 24 GB disk. Setup answered 204 in each run. Added to the empty primary, the replica accepted its first session connection 181 s and 182 s after the call (runs 2 and 3); added after a 3.9 GB load (run 1), it never did in 45 minutes, cause not read (above).

Resetting a project’s database password has a cost on the pooler side. In two exploratory RR01 runs, PATCH /v1/projects/{ref}/database/password answered 200, and a connection to the Tokyo session pooler with the new password still failed with password authentication failed for user "postgres" after a 60 s wait; one run saw the same on the replica’s pooler. A later connection in one run succeeded after minutes, and no propagation time was measured. A fresh project’s session pooler accepted its create-time password on the first attempt for both nodes (RR01l, 1 s wait). That fits the refusal following the reset and not the pooler in general, though it compares two different projects. A script that resets the password and then opens a pooler connection should expect to retry. The platform operation cost reference measured the same PATCH on a Micro project and did not probe the pooler.

PITR was the lab’s way to get a completed physical backup on a fresh project; the backups docs say projects on Postgres 15.8.1.079 and newer use physical backups already.21 Whether the 406 clears on its own once the backup that follows a compute change completes was not run; on 2026-09-03 a fresh project already listed a completed physical backup. PITR is its own add-on priced by retention period, so it belongs in the replica’s price when the project needs it.21

  • Writes. The replica accepts select only.1
  • Auth, Storage and Realtime. “Requests to other Supabase products, such as Auth, Storage, and Realtime, aren’t able to use a Read Replica or its API endpoint.”1
  • Failover. The read replica docs describe no way to promote a replica or fail over to one (doc-read 2026-10-08); the production checklist recommends replicas “if you require availability resilience to a disk failure event”.22 For a region outage, the warm standby in the DR tiers reference is the tier that runs somewhere else.
  • Survive an upgrade or a restore. “Projects with read-replicas can’t be upgraded. You need to delete the replicas and re-create them after upgrade completes.”8 The getting-started page puts data restorations under the same rule: all replicas come down first, and you re-deploy them once the operation completes.19 The major upgrade guide carries this as a pre-window checklist item; reads go to the primary only once clients are repointed at the primary’s URL (the load balancer endpoint is removed with the last replica), so repoint first and size the primary to carry them. A move to a new major version by logical replication into a new project is neither: in RR10 (2026-11-10, one run) the source kept its replica through the publication and the copy (above).
  • Fresh data on demand. Replication is asynchronous,1 and “High replication lag can result in stale data returned for queries executed against the affected read replicas.”19 The lag measured in RR01 is under Replication lag and cancellation.

RR01 (2026-10-10; Tokyo primary, Singapore replica, one project, one run) read the standby settings and then provoked the recovery conflict that cancels a long replica query.

pg_settings on both nodes (RR01l):

SettingValueSource
max_standby_streaming_delay30 sdefault
max_standby_archive_delay30 sdefault
hot_standby_feedbackoffdefault
statement_timeout120 sconfiguration file
hot_standbyon for the replica, off for the primary

The 30 s matches the Supabase blog’s description of max_standby_streaming_delay as the time the replica waits before cancelling conflicting queries, “default: 30 seconds”, and its note that raising it costs more replication lag during heavy queries (blog dated 2026-01-15; documented, not run).23

On the replica, a repeatable-read transaction counted a 50,000-row table and then ran select pg_sleep(100). Three seconds later the primary ran either update plus vacuum on that table (RR01m1 to RR01m3) or lock table ... in access exclusive mode (RR01n1 to RR01n3). All 6 replica statements were cancelled with SQLSTATE 40001, canceling statement due to conflict with recovery. The DETAIL was User query might have needed to see row versions that must be removed. after the vacuum and User was holding a relation lock for too long. after the lock.

Conflicting primary commandCancelled afterRow written afterwards, visible on the replica after
update + vacuum (3 trials)31.1, 31.3, 31.6 s30.8, 30.5, 31.3 s
ACCESS EXCLUSIVE lock (3 trials)30.2, 30.2, 30.3 s30.4, 30.2, 30.4 s

Times are from the start of the primary command, taken on the client clock when the error arrived; the visibility column polls the replica’s endpoint at 0.7 s. Replay lag sampled during a stall stayed flat (822,920 bytes in the first vacuum trial, 352 bytes in the first lock trial), so replay on the replica was stopped, not slow. Why the vacuum trials run about 1 s longer was not separated: the update of 50,000 rows replays first and may start the timer later. pg_stat_database_conflicts on the replica read confl_snapshot 3 and confl_lock 2 after the 3 vacuum and 3 lock trials; its reads lag, so the counters are recorded and not used.

The read-your-writes gap on a replica is bounded by max_standby_streaming_delay when a conflicting command is replaying, not by network lag: a row written on the primary after the conflicting command was invisible on the replica for 30.2 to 31.3 s. That is the largest gap RR01 measured. RR01 did not read the load balancer during a stall; RR02h (2026-10-23) and RR04j (2026-10-26) did, and it kept sending GETs to the stalled replica. Not run in RR01: hot_standby_feedback on, another max_standby_streaming_delay, a query idle in transaction instead of in pg_sleep, and a query through the Data API. RR08 (2026-10-28) ran all but the idle transaction on a same-region replica, below. Corrected 2026-10-28: this paragraph said the Data API query “has its own statement timeout”, which read as a bound on a conflicting read. RR08 read the 8 s statement_timeout for authenticated, and replica-served Data API reads still ran up to 25,759 ms under conflicts, inferred to be PostgREST retrying the cancelled transaction; the timeout bounds one statement, not the request.

Every write in RR01 went from Singapore to Tokyo, so the client took longer to return than replication took to arrive, and the rows below bound the gap for a client of that shape; they are not a measurement of replication delay.

RownResult
RR01i: insert on the primary’s endpoint, then GET from the replica’s endpoint at once300 of 30 first reads missed; time from POST response to the first read that saw the row: median 36.6 ms, p95 113.5 ms, maximum 223 ms; POST round trip median 122.2 ms
RR01j: POST through the load balancer, then GET rr_whoami through it30first GET served by the replica 30 of 30, row present 30 of 30
RR01k: per-insert delay from the two database clocks (insert on the primary through a session pooler connection, replica polled with clock_timestamp())40first poll that saw the row: median 41 ms, p95 44.3 ms, maximum 655.5 ms; poll round trip median 7.3 ms; most polls for one insert 83

In RR01i the visible time equals the read’s own round trip, because the row was already there. The RR01k median is mostly the insert’s response travelling to the client before the first poll, so for 38 or more of the 40 inserts it is a ceiling on the delay; the maximum is a real delay of that order for at least one insert, and its cause was not examined. The two clocks are on different hosts, so skew sits inside every RR01k figure.

Data API reads against updates and VACUUM (RR08)

Section titled “Data API reads against updates and VACUUM (RR08)”

RR08 (replica-routing, 2026-10-28) asked what can be tuned on hosted when an app reads lists that take seconds through the Data API from a same-region replica while the primary takes continuous updates and VACUUM. Two runs at the same time, one throwaway Pro project each: Small primary in ap-southeast-1 with pitr_7, one Small replica in the same region, the Singapore workstation. Figures are from the RUNLOG at 69ea595 and the two artifacts.

  • Readers: 4 loops on the replica’s own host and 4 on the load balancer, back to back, GET /rest/v1/rpc/rr8_list?p_ms=N with N uniform in 1,000 to 6,999 ms and a user token (role authenticated), client timeout 30 s. rr8_list is a stable plpgsql function over a 1,500,000-row table that repeats a 100,000-row aggregate and a 0.25 s sleep until p_ms has passed, under one snapshot. The replica’s role settings read anon statement_timeout=3s, authenticated statement_timeout=8s (RR08o).
  • Writer: update of 500 consecutive ids every 250 ms (2,042 to 2,225 rows a second across the arms) and VACUUM (VERBOSE) every 30 s; autovacuum never ran, so every vacuum figure is the explicit one.
  • Staleness: a heartbeat row inserted on the primary every 250 ms, its age read on the replica host every 500 ms (clock skew and the 250 ms period included); replay_lag and the replica walsender’s age(backend_xmin) read on the primary every second; pg_stat_database_conflicts on the replica before and after each arm.

The settings were changed with PUT /v1/projects/{ref}/config/database/postgres, as supabase postgres-config update does; the docs list both as CLI-configurable with no restart.24 In 6 of 6 changes over two runs the value showed in pg_settings on both nodes at the first read, 10 s after the call, with no restart of either node (RR08g, RR08i, RR08k). RR02d had once read the default on the replica after a PUT of 600s; that did not recur here, so read the value back on the replica before relying on it.

Each arm ran the readers, the writer and VACUUM for 240 s (C 300 s), in the order A, D, C, B within a run, with the lock arms and RR08m in between and after. Cells read run 1; run 2.

A defaults: 30 s, feedback off (RR08e)D: delay 5 s (RR08h)C: delay 120 s (RR08j)B: feedback on, delay 30 s (RR08l)
reads, replica host / load balancer218 / 241; 211 / 221168 / 192; 188 / 217282 / 270; 277 / 296245 / 243; 246 / 238
reads that failed at the client0; 02; 1, each a 30 s client timeout0; 00; 0
40001 or 57014 returned to the client0; 00; 00; 00; 0
confl_snapshot on the replica during the arm436; 2881,404; 863316; 1310; 0
longest replica-served read, replica host (planned at most 6,999 ms)11,547; 13,021 ms19,358; 18,899 ms16,596; 13,166 ms7,019; 7,044 ms
read time minus planned, p95, replica host / load balancer replica-served3,407 / 1,460; 3,165 / 3,824 ms8,461 / 9,463; 5,418 / 6,264 ms157 / 186; 113 / 122 ms120 / 157; 91 / 102 ms
heartbeat age on the replica host, p50 / p956,771 / 25,557; 7,258 / 23,641 ms1,273 / 4,589; 506 / 4,269 ms14,181 / 86,425; 13,245 / 49,248 ms35 / 153; 6 / 28 ms
largest heartbeat age within a stale episode29,025; 28,874 ms5,528; 5,259 ms90,903; 63,246 msno poll over 2,000 ms after the first
polls over 2,000 ms75; 84.4 %39.4; 29.8 %95.7; 96.7 %0.2; 0.2 % (the first poll)
oldest data a replica-served read saw, replica host26,038; 25,975 ms4,475; 4,819 ms89,501; 59,587 ms250; 236 ms
VACUUM: dead tuples not yet removable per pass, max13,000; 13,0009,500; 12,50012,500; 11,50026,500; 26,000
VACUUM: removable cutoff age, max52; 52 XIDs38; 52 XIDs50; 46 XIDs106; 106 XIDs
replica xmin age on the primary, maxnone (feedback off)nonenone130; 128 XIDs

The first poll of each arm could read the previous arm’s last heartbeat row, so it is left out of the largest-age row; it moves the p50 and p95 by at most one poll.

  • A, the defaults. No read failed at the client in either run, but the replica recorded 436 and 288 snapshot conflicts, replay stopped for up to about 30 s at a time (the long stale episodes ran 28.5 to 30 s), and replica-served reads took up to 11,547 and 13,021 ms against a planned 6,999 ms at most and an 8 s statement_timeout.
  • D, 5 s. Replay never fell more than about 5 s behind (replay_lag max 5,010.1 and 5,004.6 ms), at the price of the most conflicts and the longest reads, 25,759 ms through the load balancer in run 2. The three reads past the client’s 30 s timeout all started in the last 7 s of the arm, with the writer still running.
  • C, 120 s. Fewer conflicts and small overruns, but replay stopped for up to 122.8 and 120 s, and a replica-served read saw data 89,501 and 59,587 ms old. The Supabase blog’s note that raising the delay costs lag during heavy queries23 is what this arm measured.
  • B, hot_standby_feedback on. 0 snapshot conflicts, no overrun beyond 157 ms at p95, data at most 250 and 236 ms old as a read saw it. The cost moved to the primary: VACUUM could not remove 21,500 to 26,500 (run 1) and 23,270 to 26,000 (run 2) dead tuples per pass, against 1,000 to 13,000 and 0 to 13,000 in A, and its removable cutoff was up to 106 XIDs old against 52, held by the replica’s xmin. Heap growth is not compared between arms: A, D and C had already grown the table before B ran.

The Postgres docs describe the same trade: hot_standby_feedback “prevents VACUUM from removing recently-dead rows and so cleanup conflicts do not occur”, and “this will delay cleanup of dead rows on the primary, which may result in undesirable table bloat”.25 RR08m measured the bloat side with one long reader: with feedback on, a repeatable-read transaction on the replica that held its snapshot for 120 s was not cancelled, VACUUM’s not-yet-removable count grew by 60,000 a pass (30,000, 90,000, 150,000, 210,000) until it committed and fell to 24,000 and 30,000 on the next pass, the replica’s xmin reached 1,009 and 1,002 XIDs old, and the heap grew 10.6 and 9.6 MB in 165 s at about 2,000 updated rows a second.

Feedback does not cover locks. RR08f and RR08n took a 0.2 s ACCESS EXCLUSIVE lock on the table three times per arm, readers on and no writer: replay stopped behind it with feedback off (largest heartbeat age 5,270 and 10,567 ms) and on (6,292 and 6,736 ms). confl_lock stayed 0 and no read failed in either, because every read ended inside the 30 s delay; a lock under a 5 s delay was not run.

Why no conflict reached the client is inferred, not measured. confl_snapshot rose by 131 to 1,404 an arm while 0 of 2,781 reads in those arms returned 40001; reads ran longer than one statement can under the 8 s statement_timeout; and the overrun is largest where conflicts are most frequent (D) and absent where there are none (B). That fits PostgREST retrying the cancelled transaction. PostgREST issue 3673 reports exactly this on a replica, “Surprising infinite retrying of SQL statement on a replica causes replication lag”,7 and v16.0 (released 2026-08-07) lists “Fix automatic transaction retries on 40001 (serialization_failure) errors to prevent replication lag”.26 The PostgREST version these projects ran and the replica’s Postgres log were not read, so the retry count per read is not known. On a PostgREST that does not retry, each of these conflicts would most likely reach the client as a 40001 error instead of a slower read; that was not tested.

Steady lag with no updates (RR08d, heartbeat only, 4 inserts a second, 120 s): replay_lag p50 / p95 / max 2.6 / 3.7 / 4.7 ms (run 1) and 1.5 / 2.1 / 5.9 ms (run 2), the replica at most 296 bytes behind. The replay stops above are set by max_standby_streaming_delay and the overlapping readers rather than by the region pair (inferred): RR01 saw 30.2 to 31.6 s cross-region with one long query at the same default.

Not settled by RR08: the PostgREST version and the per-read retry count, and whether a retry continued after the client gave up at 30 s; a lock under a 5 s delay or held longer than 0.2 s; feedback with Data API reads longer than 7 s and its cost above about 2,000 updated rows a second; autovacuum on its own schedule; more than 8 concurrent readers, other sizes, regions, or a cross-region replica. Cost was not metered: each run kept a Small primary, a Small replica and pitr_7 for about 49 and 48 minutes.

The dashboard and the logs both answer it, from the docs. Items 1, 2 and 4 were not exercised by a lab module; item 3’s fields were read in RR01o (2026-10-10), item 5 was run in RR01, item 6 in RR08 (2026-10-28), and item 7 in RR09d (2026-11-09):

  1. Database Reports, with the Source toggle on the replica, shows its resource use.1 A replica at idle CPU while the primary is busy is the first sign (inferred).
  2. API Reports covers “API requests going through either a Read Replica or Load Balancer API endpoint”.1
  3. In the API logs, a request through the load balancer records the database that served it: “The upstream database or the one that eventually handles the request can be found under the Redirect Identifier field. This is equivalent to metadata.load_balancer_redirect_identifier when querying the underlying logs.”1 The log field reference lists it on edge_logs as log_attributes['load_balancer_redirect_identifier'].6 RR01o read it on 152 load balancer rows (<ref>.supabase.co for the primary, a -rr- host for the replica), next to request.cf.colo and the load_balancer_geo_aware_info choice fields described above.
  4. Replication lag sits under Replica Information on Database Reports.19 For a metrics pipeline, the docs name physical_replication_lag_physical_replica_lag_seconds; the Grafana guide’s alert uses physical_replication_lag_physical_replication_lag_seconds (not reconciled). The Grafana monitoring guide covers ingesting that endpoint. RR01 did not read this metric; it sampled replay lag as primary current LSN minus replica replay LSN during the conflicts above.
  5. To tell which node answered a request, call a function that returns pg_is_in_recovery() and pg_postmaster_start_time(). inet_server_addr() cannot identify a replica: it returned the loopback address on the primary and on the replica (RR01 exploratory run, artifact not published).
  6. On the replica, pg_stat_database_conflicts counts queries cancelled by recovery conflicts (confl_snapshot, confl_lock).25 Read it even when clients see no errors: in RR08 it rose by 131 to 1,404 an arm while 0 of 2,781 Data API reads returned 40001, and the conflicts showed up as slower reads instead (above).
  7. To see which hostname an app calls, group edge_logs by log_attributes['request.host']. RR09d found each of 80 tagged GETs logged under the hostname the client addressed, a custom domain under its own name, and only the load balancer’s rows carried a redirect identifier (above).

The query below counts Data API requests per serving database and method. It is built from the documented field names and the documented query syntax627 and was not run here (RR01o ran its own edge_logs queries against the Management API logs endpoint; a query that put split(...)[1] in the select list was refused with Backend error! Retry your query., and the cause was not isolated to split):

-- Data API requests by serving database and method, over the Explorer's time range
select
log_attributes['load_balancer_redirect_identifier'] as served_by,
log_attributes['request.method'] as method,
count() as requests
from logs
where source = 'edge_logs'
and log_attributes['request.path'] like '/rest/v1/%'
group by served_by, method
order by requests desc
limit 50;

Rows with an empty served_by are requests the field did not describe; the docs define the field only “for API Load Balancer traffic”,6 so a large empty bucket reads as traffic that never went through the load balancer (inferred). In RR01 the one load balancer POST row had the primary’s identifier and no geo fields, so a POST through the load balancer is not an empty bucket. POST rows against /rest/v1/rpc/ are function calls the replica cannot take until they use get: true.

The same count per hostname, adapted from the query RR09d ran through the Management API logs endpoint. RR09d’s filtered on one path, /rest/v1/rr_marker, and also grouped by query string, method and status; this form was not run as written:

-- Data API requests by hostname and serving database
select
log_attributes['request.host'] as host,
log_attributes['load_balancer_redirect_identifier'] as served_by,
count(*) as requests
from logs
where source = 'edge_logs'
and log_attributes['request.path'] like '/rest/v1/%'
group by host, served_by
order by requests desc
limit 50;

In RR09d a row under the load balancer host carried the identifier of the node the request was routed to, and rows under the custom, replica and project hosts carried none.

Rows marked documented rest on the docs, read 2026-10-08; rows with an RR01 id were measured on 2026-10-10 in one project and one run. The Module column says which. MS06 and S07 resolve in the medium-serverless RUNLOG and the sfp-platforms RUNLOG; RR01 resolves in the replica-routing RUNLOG; RR03 (2026-10-26, two runs, primary and replica in one region) in the RUNLOG at 4afd0b7; RR04 (2026-10-26, two runs) at 1ee4686; RR06 (2026-10-28, two runs) at 21c54ae; RR07 (2026-10-28, runs 0 to 2, of which runs 1 and 2 completed) at c64837c; RR08 (2026-10-28, two runs) at 69ea595; RR09 (2026-11-09, Team org, three runs, one past the replica step: run 3, every arm but RR09g) at d4ef76e; RR10 (2026-11-10, Team org, one run, three projects) at f5bd16b. RR04, RR06, RR07, RR08 and RR09 all ran with the primary and the replica in ap-southeast-1, and RR10’s three projects and their replicas were there too.

PracticeEvidenceModule
Count the replica’s share in the API logs before paying for another month.metadata.load_balancer_redirect_identifier names the database that served a load-balanced request; the query above groups by it. RR01o read the field on 152 rows.documented; RR01o (2026-10-10) read the fields; query above not run
Group edge_logs by request host to see which hostname an app calls.80 tagged GETs to the custom, load balancer, replica and project hosts gave 80 rows, each under the hostname the client addressed (log_attributes['request.host']), the custom host under its own name; only the load balancer’s rows carried a redirect identifier, naming the node each request was routed to.RR09d (2026-11-09, run 3)
Point Data API reads at the load balancer endpoint or a replica endpoint.Only those two endpoints reach a replica; the load balancer is a separate endpoint on the API settings page. 40 of 40 GETs through it from Singapore reached the replica, at 46.5 ms median against 117.5 ms to the primary directly.RR01f (2026-10-10)
Call read-only functions with rpc(fn, args, { get: true }).Non-GET requests go to the primary; get: true sends a GET with arguments in the query string. A function that writes fails under GET with 405 25006. Through the load balancer, GET rpc/rr_whoami reached the replica and POST rpc/rr_whoami the primary; supabase-js 2.118.0 get: true reached the replica for stable, definer and volatile read-only functions, and every POST the primary.RR01f, RR01g (2026-10-10); RR03f (2026-10-26, two runs)
Keep get: true to functions whose arguments are scalars or arrays.The client converts each argument to a string for the query string; an object argument becomes [object Object].source read at 84e2c5d; not run
Send Data API reads to the load balancer when the project uses a custom domain.Custom-domain requests are not routed through the load balancer: 200 of 200 anonymous GETs and 50 of 50 user reads through the custom host reached the primary in each run, while interleaved load balancer GETs split 105 / 95 and 102 / 98 replica / primary. Until 2026-10-28 this row read “Send reads to a replica endpoint” and “not measured”.documented; RR06e (2026-10-28, two runs)
Size the primary for every cache miss while reads stay on a custom domain.Through the custom host the primary served 9,825 of 9,825 cold reads (274,027 buffer misses on the primary), and 8,529 of 8,529 with four sequential scans on its disk; the replica served none. Through the load balancer the same kind of reads split 1,529 / 1,629 primary / replica, buffer misses 60,294 / 58,754.RR09e, RR09f (2026-11-09, one run of each arm)
Keep Auth on the custom domain; feed its session to a data client by accessToken.A data client on the load balancer with accessToken reading the Auth client’s session read correctly 140 of 140 times over two runs before and after a refreshSession (which token it sent after the refresh was not logged), writes reached the primary, and dataClient.auth.getSession() threw, so sign-in and refresh stay on the Auth client.RR06f (2026-10-28, two runs)
Use a token issued through the custom domain on any host.Its iss is the project host; 10 of 10 reads per host returned the user’s rows under RLS on the custom, load balancer, replica and primary hosts.RR06d (2026-10-28, two runs)
For one hostname, route GET/HEAD on /rest/v1/* to the load balancer in a Worker.Everything else to the custom domain. Password, OAuth (PKCE) and SAML sign-ins, refresh, reads under RLS and writes all worked through it; CORS headers matched the custom host in 9 of 9 comparisons per run; the hop added 1.6 and 20.3 ms at p50 (not separated from Cloudflare location effects).RR06g (run 2), RR07d-m (2026-10-28, runs 1 and 2)
Register the custom host’s callback and ACS with providers, even behind a Worker.The Auth server sent redirect_uri <custom-host>/auth/v1/callback whichever host the flow entered at, the Worker host included; SP entity ID and ACS were the custom host’s from every host. Mock issuer and lab IdP, so a vendor’s registration checks were not exercised.documented; RR07h-k, RR07m (2026-10-28)
Check a new Worker hostname with a resolver that never cached its miss.The record was on the zone’s nameservers and 1.1.1.1 3 and 5 s after wrangler deploy; a Bun Resolver that asked before it existed kept ENOTFOUND (ad-hoc probe, not in an artifact).RR07d (2026-10-28)
Do not cache REST GETs in front of the API without the Origin in the cache key.The actual GET response reflected the request’s origin in Access-Control-Allow-Origin with Vary: Accept-Encoding only; inference, the Worker does not cache.RR07f (2026-10-28), inference
Place a replica closer to the users than the primary is.Chosen region followed the Cloudflare colo in 9 groups of rows (SIN, SYD, BOM, GRU to the replica’s region; NRT, DUB, IAD, SJC to the primary’s); a distance rule and a fixed colo table both fit. A replica in the primary’s region took 94 to 115 of 200 GETs, about half.RR01h, RR01o (2026-10-10); RR03h (2026-10-26, two runs); MS06 shows a same-region replica serves SQL
Pass user tokens by accessToken or a header on a replica host, not setSession().On the replica’s host setSession() failed with Failed to parse JSON (its /auth/v1/user answer was not JSON; RR02f: the replica host answers other Auth paths with 400), and the next read went out as anon: 0 rows, no error. The other patterns read 3 and 5 rows per user with RLS, as on the primary.RR03d (2026-10-26, two runs)
Do not read 25006 as proof that the replica answered.A writing function under GET answered 405 25006 on the replica (in_recovery=t) and on the primary (in_recovery=f).RR03f (2026-10-26)
Send HEAD and POST through the load balancer, never the replica’s own host.The replica’s host answered 400 to HEAD and 400 Read replica does not handle POST requests... to POST; through the load balancer HEAD reached both nodes, all 200. RR04d: the HEAD 400 is text/plain with no body, and the replica host’s CORS preflight still lists HEAD and POST, so a preflight does not reveal the refusal (inference).RR03f, RR03g, RR04d (2026-10-26)
With a same-region replica, read a row that must be fresh from the primary.GETs through the load balancer landed on either node per request; replica stale_ms p50 17 and 21 ms against 12 on the primary at 50 inserts/s. RR04e-g then measured read-your-writes (corrected 2026-10-28; this cell said “not measured as such”): 0 misses in 456 replica-served reads straight after a POST from a client whose POST round trip was 20.8 to 24 ms at p50 (RR04e-g), by inference because the replica replayed faster than the round trip. A closer client was not run, and a replica with stopped replay still got 46 of 102 and 180 of 343 reads (RR04j).RR03h, RR03i, RR04e-g, RR04j (2026-10-26)
Size a same-region replica for about half the Data API reads, at any load.Replica share 46.5 to 51.1 % at 1, 8 and 32 concurrent readers, up to 1,125.1 requests a second, 0 errors; 48.7 to 50.8 % with four busy loops on either node. On a Team org with reads that miss the cache: 1,629 of 3,158 with the replica at 308.3 ms p50 against 64.7 ms, and 4,961 of 9,950 with four sequential scans on the primary.RR04h, RR04i (2026-10-26, two runs); RR09e, RR09f (2026-11-09, one run of each arm)
Expect the load balancer to keep routing to a replica whose reads are stale, slow or 503.Same region, about half: 11 of 20 GETs while every request routed to the replica got 503 (bodies not recorded, so the answering layer is unknown; RR09d); 1,629 of 3,158 cold reads to a replica at 308.3 / 762.1 ms p50 / p95 against 64.7 / 87.3 (RR09e); 46 of 102 and 180 of 343 to a replica up to 30,669 ms stale (RR04j). Cross-region, all of them: 586 of 586 and 98 of 98 to a stale replica (RR02h). The RR02h and RR04j replicas answered 200 with stale rows.RR09d, RR09e (2026-11-09); RR04j (2026-10-26); RR02h (2026-10-23)
Check edge_logs for replica 503s that supabase-js retried.Run 1’s logs held two GETs routed to the replica that answered 503 and that no client result showed; postgrest-js 2.118.0 retries GET and HEAD on 503 and 520. RR09d sent raw fetch with no retry: the 11 load balancer rows with 503 all named the replica.RR03 run 1 (2026-10-26); RR09d (2026-11-09)
Price each replica as a second database at the primary’s compute size.Compute, 1.25x disk from the first byte, IOPS, throughput and IPv4 are mirrored; credits and the spend cap do not apply.documented
Budget the replicas into every primary upsize.Replicas are resized with the primary, after it, concurrently.documented; not measured
Wait for, or force, a completed physical backup after the resize to Small.Setup answered 406 "Failed to check for latest completed physical backup" on Small; 204 after pitr_7. MS06 served 219 s after setup; the cross-region replica on Small served at 271 s. On a Team org, a same-region replica added to an empty Small primary with pitr_7 accepted its first session connection at 181 s and 182 s.S07/S07e (2026-08-25), MS06 (2026-09-30), RR01d (2026-10-10), RR09b (2026-11-09, runs 2 and 3)
Add the replica before a large initial load or subscription where you can.Added after a 4,000,000-row load (3.9 GB total relation size, loaded in 192 s), a replica answered setup 204 and accepted no session connection in 45 minutes; the cause was not read (a slow base backup and a disk change to 36 GB are both open, and run 1 ran different module code). Added to the empty primary in runs 2 and 3, it accepted its first session connection 181 s and 182 s after the setup call and the load streamed to it. RR10 (a 3.9 GB copy by logical replication): a target’s replica added before its subscription accepted its first session connection at 182 s and followed the copy, lag up to 81,396,272 bytes and, separately, 17,970 ms; one added about 38 minutes after its copy finished got no pooler entry in 60 minutes. Replica first served in RR09 runs 2 and 3 and in RR10b and RR10c (both of those RR10 replicas later logged No space left on device, hand read); replica after the load failed in RR09 run 1, and after the copy in RR10e; not a proven rule.RR09b (2026-11-09, runs 1 to 3); RR10b to RR10e (2026-11-10, one run)
Add each target’s replica before its subscription; the move does not need the source’s replica removed.S (15.19) kept its replica through the publication, both create subscription calls (201) and a 4,000,000-row copy to each 17.11 target. A’s replica, added to the empty project before its subscription, accepted its first session connection at 182 s and held A’s 4,000,000 rows after the copy; B’s, added about 38 minutes after B’s copy finished, got no pooler entry in 60 minutes. A’s own table never reached r (A and B subscribed at the same time; see the pgmig reference), so no target had both a replica first and a finished sync. Both replicas that followed the load or the copy logged No space left on device (hand read). One run, Small, ap-southeast-1, Team org.RR10b to RR10e (2026-11-10, one run)
Delete replicas before an in-place upgrade or restore; repoint clients, size the primary.Upgrades and data restorations require all replicas down first; recreate after. The upgrading docs list it among the upgrade’s prerequisites.8 A move to a new major version by logical replication into a new project did not need it: RR10’s source kept its replica through the publication and the copy.documented; RR10b, RR10d (2026-11-10, one run) for the logical path
Repoint clients off the load balancer endpoint before removing the last replica.The docs say the load balancer and its endpoint are removed with the last replica; in RR02j the endpoint answered errors for at least 1,185 s, 400 Load balancer does not seem to be configured properly. continuously from 70.7 s (run 2), and kept resolving (checked in run 2); 0 reads served by the primary.documented; RR02j (2026-10-23, two runs)
Plan region failover on a standby, not a replica.The docs describe no promotion path; Auth stays on the primary.documented (absence)
Keep replica queries under 30 s, or raise max_standby_streaming_delay.30 s default on both nodes with hot_standby_feedback off: 6 of 6 held queries cancelled with 40001 after 30.2 to 31.6 s. Raising it is documented to add lag; RR08j (2026-10-28) ran 120 s: 316 and 131 conflicts, but replay stopped for up to 122.8 and 120 s and a read saw data 89,501 ms old.RR01l, RR01m, RR01n (2026-10-10); RR08j (2026-10-28)
Turn on hot_standby_feedback for replica reads that race updates and VACUUM.0 snapshot conflicts in both runs against 436 and 288 at the defaults; reads at most 7,019 and 7,044 ms for a planned 6,999, data at most 250 and 236 ms old.RR08l (2026-10-28, two runs)
With hot_standby_feedback on, watch dead tuples and long replica transactions.VACUUM could not remove up to 26,500 and 26,000 dead tuples a pass against 13,000 at the defaults; one 120 s replica transaction grew that to 210,000 in four passes and the heap by 10.6 and 9.6 MB in 165 s.RR08l, RR08m (2026-10-28)
Do not lower max_standby_streaming_delay to cut lag under multi-second Data API reads.5 s held replay within about 5 s (heartbeat age max 5,528 and 5,259 ms) but gave the most conflicts (1,404 and 863) and the slowest reads, up to 19,358 and 18,899 ms on the replica host, 3 past a 30 s client timeout.RR08h (2026-10-28)
Do not count on hot_standby_feedback to stop replay waiting behind a lock.A 0.2 s ACCESS EXCLUSIVE lock on the primary stopped replay with feedback on (largest age 6,292 and 6,736 ms) as with it off (5,270 and 10,567 ms).RR08f, RR08n (2026-10-28)
Read pg_stat_database_conflicts on the replica; a slow read can be a hidden conflict.At the defaults 0 of the arm’s reads returned 40001 while confl_snapshot rose 436 and 288, and reads ran up to 11,547 and 13,021 ms under an 8 s statement_timeout. Inferred: PostgREST before v16.0 retries 40001 (issue 3673); the version on these projects was not read.RR08e (2026-10-28), inference
Retry 40001 on replica reads in the client once the API runs PostgREST v16.0.v16.0 stopped retrying transactions on 40001. That these conflicts would then reach the client as errors is inferred, not tested.PostgREST v16.0 release notes;26 RR08e by inference
Set standby settings by PUT config/database/postgres; confirm them on the replica.6 of 6 changes were in force on both nodes at the first read, 10 s after, with no restart; RR02d once read the default on the replica after a PUT.RR08g, RR08i, RR08k (2026-10-28); RR02d (2026-10-23)
Read a just-written row from the primary when a long replica query may conflict.While replay was blocked a new row was invisible on the replica for 30.2 to 31.3 s. Through the load balancer, every read during a stopped replay went to the replica, up to 176,772 ms stale (RR02h).RR01m, RR01n (2026-10-10); RR02h (2026-10-23)
Health-check the replica yourself and fail reads over to the primary’s URL in the client.The load balancer did not: it kept a stale replica in rotation (586 of 586 and 98 of 98 reads) and failed every read while the replica was down with the primary up, sending none of its 334 and 415 reads across the restart phase to the primary. Same region (RR04j-k), it still sent 46 of 102 and 180 of 343 reads to a replica up to 30,669 ms stale, and reads to whichever node was down in a restart failed. RR09d: it routed 11 of 20 GETs to the replica while every request routed to the replica got 503.RR02h, RR02i (2026-10-23, two runs); RR04j, RR04k (2026-10-26, two runs); RR09d (2026-11-09)
Send GraphQL to the primary’s URL, never the load balancer./graphql/v1 through the load balancer answered 400 for POST and GET; the primary’s host answered 200 to POST (its GET form answered 404 PGRST202).RR02f (2026-10-23, run 1)
Tell the nodes apart with pg_is_in_recovery() and pg_postmaster_start_time().inet_server_addr() returned the loopback address on both nodes.RR01 exploratory run (not published)
Take the load balancer host from the API settings page, not the Management API.The Management API returns neither host; the Dashboard route answered a PAT 401 Unsupported access token; <ref>-all.supabase.co was found by name. On a Team org it answered at the first probe (run 3) and the Dashboard route again answered the PAT 401; run 2 probed once and recorded it as not found.RR01e (2026-10-10); RR09b (2026-11-09)
Retry the pooler connection after PATCH /database/password.The Tokyo session pooler refused the new password after 60 s in 2 exploratory runs; a fresh project’s pooler accepted its create-time password at once.RR01 exploratory runs, recorded in the RUNLOG (not published); RR01l

Not measured anywhere in the lab, and stated as such above (as of 2026-11-10): the rule behind the same-region split (RR03h measured about half and half per request and RR04h-k found it unchanged under load, CPU loops, a stopped replay and a restart, but not the mechanism, and not with two replicas or a node slowed at the REST layer; RR09e-f kept it at about half with a replica answering at 308.3 ms p50 against 64.7 ms and with a busy primary disk, neither slowed to the point of timing out); why a replica added after a 3.9 GB load or copy never served (RR09b run 1, RR10e); a target replica added before its subscription on a target whose sync then finished (RR10); the replicas’ disk sizes, after both RR10 replicas that followed a large write logged No space left on device; which layer answered the 503s on requests routed to the replica (RR09d); read-your-writes for a client closer than about 20 ms to the database; an OAuth or SAML round trip with a real provider’s registration checks; the PostgREST version on hosted projects and how many times it retried a conflicting read; Auth-issued HS256 and third-party user tokens on a replica; the load balancer’s rule, which RR01o could not separate between a distance rule and a fixed colo table; a replica down while the primary and the load balancer config are untouched; whether the load balancer endpoint ever serves the primary after the last replica is removed (not seen within 1,200 s; RR09g, written to watch longer, was not run); replica lines on a real invoice; hot_standby_feedback with Data API reads longer than 7 s or under a lock with a 5 s delay; replication delay for a write larger than RR01’s 50,000-row update, other than the peak replica lag RR10d sampled during a 4,000,000-row copy; whether the 406 clears on its own once the backup that follows the resize to Small completes. Three items this list held on 2026-10-26 have since been measured: whether a custom-domain request lands on the primary (RR06e: it does), read-your-writes through the load balancer with a same-region replica (RR04e-g: 0 misses of 456 from this vantage), and the conflict window with hot_standby_feedback on (RR08l: no snapshot conflicts).

ClaimStatusHow it was checked
Replica setup gate: 400 below Small, 406 awaiting a physical backup after the resize to Small, 204 after pitr_7measuredsfp-platforms S07/S07e, 2026-08-25, Pro org; responses recorded in the RUNLOG
Same-region replica accepted, in the pooler config after 216 s, pg_is_in_recovery() = true after 219 s, removal 204, entry gone from the pooler config on the first poll (0 s)measuredmedium-serverless MS06, 2026-09-30, Medium primary in ap-southeast-2; facts
GET /rest/v1/rpc/rr_whoami through the load balancer reached the replica 40 of 40 from Singapore, and POST rpc/rr_whoami and a POST insert reached the primarymeasuredreplica-routing RR01f, RR01g, 2026-10-10, Pro org, Small primary in ap-northeast-1, replica in ap-southeast-1; one project, one run; facts
Edge Function GETs pinned with x-region (10 each): replica for ap-southeast-1, ap-southeast-2, ap-south-1, sa-east-1; primary for ap-northeast-1, eu-west-1, us-east-1, us-west-1measuredRR01h1 to RR01h8, same run and facts
Load balancer host <ref>-all.supabase.co and replica host <identifier>.supabase.co found by name; the Dashboard load balancer route answered a PAT 401 Unsupported access tokenmeasuredRR01e, same run
edge_logs carries request.cf.colo, load_balancer_geo_aware_info.available_supabase_regions and .chosen_supabase_region, and load_balancer_redirect_identifier; chosen region followed the colo in 9 groups; the rule is not separatedmeasuredRR01o, 152 load balancer rows, same run; a split(...)[1] select was refused with Backend error! in an exploratory run
Custom-domain request lands on the primary: 200 of 200 anonymous GETs and 50 of 50 user reads per run through the custom host, against 105 / 95 and 102 / 98 replica / primary on the interleaved load balancer readsmeasured (inferred until 2026-10-28; not run in RR01)replica-routing RR06e, 2026-10-28, two Pro projects, Small primary and Small replica in ap-southeast-1, custom_domain add-on; facts (run 1), facts (run 2)
A token issued through the custom host (iss the project host) read the user’s rows on the custom, load balancer, replica and primary hosts; an Auth client on the custom host plus a load balancer data client with accessToken read correctly 140 of 140 times before and after a refreshSession (which token it sent after the refresh was not logged)measuredRR06d, RR06f, same runs
The splitting Worker on *.workers.dev: sign-in, refresh, 120 of 120 reads correct, POST writes on the primarymeasured, run 2 onlyRR06g, same run 2; run 1’s Worker host never resolved on the workstation
The splitting Worker on a Workers Custom Domain: serving 3 s and 6 s after deploy; hop +1.6 and +20.3 ms at p50; CORS identical to the custom host 9 of 9; browser sign-in, read and write; OAuth PKCE from three entry hosts with redirect_uri the custom host; SAML entity ID and ACS the custom host, sign-in through the Workermeasuredreplica-routing RR07d to RR07m, 2026-10-28, RR06’s shape, runs 1 and 2 of three; facts (run 1), facts (run 2); mock OIDC issuer and lab SAML IdP
Bun Resolver keeps an ENOTFOUND cached from before the record existed; likelier cause of RR06 run 1’s miss than the workstation resolverinferred from an ad-hoc probeRR07 RUNLOG, “RR07d”; not in an artifact
User A and B ES256 tokens read 3 and 5 rows under RLS with the right auth.uid() on the load balancer, the replica’s host and the primary’s host; setSession() on the replica’s host fails and the next read goes out as anonmeasuredreplica-routing RR03d, 2026-10-26, two Pro projects, Small primary and Small replica both in ap-southeast-1; facts (run 1), facts (run 2)
Every key type tried (legacy anon and service_role JWTs, sb_publishable_, sb_secret_, a user’s ES256 and HS256 tokens) gave the same role on all three hostsmeasuredRR03e, same runs
get: true reached the replica for stable, definer and volatile read-only functions; every POST went to the primary; a writing function under GET answered 405 25006 on both nodesmeasuredRR03f, same runs, 5 calls per function and method
HEAD through the load balancer reached both nodes; the replica’s host refused HEAD with 400measuredRR03g, same runs, 10 calls per row; edge_logs agrees
Same-region split: 111 / 89 and 94 / 106 replica / primary of 200 from Singapore; from Edge Functions 100 / 100 and 115 / 85 of 200 in ap-southeast-1, and 20 to 27 of 50 to the replica from us-east-1 and eu-west-1; switching per requestmeasuredRR03h, same runs; edge_logs 845 / 813 and 841 / 860 primary / replica GETs
Same-region staleness and lag at 50 inserts/s: replica stale_ms (includes the 20 ms insert period and clock skew) p50 17 and 21 ms against 12 on the primary; replay_lag p50 2.2 and 2.1 msmeasured, clock skew insideRR03i, same runs, 300 s each
Same-region read-your-writes through the load balancer: 0 misses of 456 replica-served reads after a POST, POST p50 about 21 to 24 msmeasured, one vantagereplica-routing RR04e-g, 2026-10-26, two Pro projects, Small primary and Small replica in ap-southeast-1; facts (run 1), facts (run 2)
Same-region split: replica share 46.5 to 51.1 % at 1 to 32 readers, 48.7 to 50.8 % with CPU loops on either node; 46 of 102 and 180 of 343 reads to a stopped replica; reads to a down node failed in a restartmeasuredRR04h to RR04k, same runs; edge_logs 521 / 522 to both nodes
Replica host HEAD 400: text/plain, Content-Length 75, the POST 400’s header names, none of the x-envoy-* or content-range headers of a 200measured; refused before PostgREST (inferred)RR04d, same runs, raw HTTP/1.1 over TLS
Stopped replay: the load balancer sent every read to the replica (586 of 586 over 174.6 s, run 1; 98 of 98 over 28.8 s, run 2), up to 176,772 ms stale, 0 to the primary, 0 errorsmeasuredreplica-routing RR02h, 2026-10-23, two Pro projects in RR01’s shape; facts (run 1), facts (run 2)
Project restart: while the replica was down and the primary up, every load balancer read failed (21 and 29 failed reads across its failing span), and none of its 334 / 415 reads across the restart phase went to the primarymeasuredRR02i, same runs
Replica removed: load balancer 400 Load balancer does not seem to be configured properly. to the end of the watch (360 s, 1,200 s), 0 of 1,034 / 0 of 4,103 reads from the primary, name resolvingmeasuredRR02j, same runs
Through the load balancer: Auth, Storage, Realtime join and an Edge Function answered; GraphQL 400; the replica’s host refused all but REST GETmeasuredRR02f, RR02k, run 1
Standby settings set by PUT config/database/postgres in force on both nodes 10 s later, no restart, 6 of 6measuredreplica-routing RR08g, RR08i, RR08k, 2026-10-28, two Pro projects, Small primary and Small replica in ap-southeast-1; facts (run 1), facts (run 2)
1 to 7 s Data API reads against about 2,000 updated rows a second and VACUUM every 30 s: conflicts 436 / 288 (defaults), 1,404 / 863 (5 s), 316 / 131 (120 s), 0 / 0 (feedback on); 0 conflicts returned to the client; heartbeat age max 29,025 / 28,874, 5,528 / 5,259 and 90,903 / 63,246 ms; feedback on left up to 26,500 / 26,000 dead tuples a passmeasuredRR08e, RR08h, RR08j, RR08l, same runs
Conflicts absorbed by PostgREST retriesinferredRR08e, RR08h, RR08j; PostgREST issue 3673 and the v16.0 release; PostgREST version and replica log not read
Feedback on with one 120 s replica transaction: not removable 30,000 to 210,000 over four passes, heap +10.6 / +9.6 MB in 165 s; a 0.2 s lock stopped replay with feedback on and offmeasuredRR08m, RR08f, RR08n, same runs
edge_logs held 80 rows for 80 tagged GETs to the custom, load balancer, replica and project hosts, each under the hostname the client addressed; load balancer rows named the primary (9, all 200) or the replica (11, all 503); the replica host’s 20 were all 503measured, one run; 503 bodies not recordedreplica-routing RR09d, 2026-11-09, Team org, Small primary and Small replica in ap-southeast-1, 24 GB disk, custom_domain add-on; facts (run 3)
Cold reads, 8 clients, 90 s per arm: custom host 9,825 of 9,825 on the primary; load balancer 1,529 / 1,629 primary / replica, buffer misses 60,294 / 58,754, replica p50 308.3 ms against 64.7 msmeasured, one run; replay on the replica inferred, not measuredRR09e, same run
Four sequential scans on the primary (node_disk 103.5 MB/s over 212 s, the arms’ point reads included): load balancer 4,989 / 4,961 primary / replica, custom host 8,529 of 8,529 on the primarymeasured, one run; a busy disk, no saturation measuredRR09f, same run
A replica added after a 4,000,000-row load answered setup 204 and never served in 45 minutes; added to the empty primary it accepted its first session connection 181 s and 182 s after the setup callmeasured; one failure, cause not readRR09b, facts (run 1), facts (run 2), facts (run 3); the 36 GB volume is a hand read recorded in the RUNLOG, not in an artifact
Around a 15 to 17 move by logical replication: the 15.19 source kept its replica through the publication, both subscriptions (201) and a 4,000,000-row copy to each 17.11 target; a target replica added before its subscription accepted its first session connection at 182 s and followed the copy (lag up to 81,396,272 bytes and, separately, 17,970 ms); one added about 38 minutes after the copy got no pooler entry in 60 minutes; both replicas that followed a large write logged No space left on devicemeasured, one run; the log lines are hand readsreplica-routing RR10b to RR10e, 2026-11-10, Team org, three Small projects in ap-southeast-1 with pitr_7 and 24 GB disks; facts; hand reads, not in the artifact
max_standby_streaming_delay 30 s (default) and hot_standby_feedback off on both nodes; 6 of 6 held replica queries cancelled with 40001 after 30.2 to 31.6 s; a row written afterwards invisible for 30.2 to 31.3 smeasuredRR01l, RR01m1 to RR01m3, RR01n1 to RR01n3, same run; hot_standby_feedback on not run
First read after a write on the cross-region replica: 0 of 30 missed; per-insert delay median 41 ms, maximum 655.5 msmeasured, bounds one client shapeRR01i, RR01j, RR01k, same run; writer returned slower than replication; RR01k includes clock skew between hosts
Cross-region replica on Small: entry and first answer at 271 s, removal 204 and gone on the first pollmeasuredRR01d, RR01p, same run; about 150 s in two exploratory runs whose console logs were not kept
Tokyo session pooler refused the new password after PATCH /database/password and a 60 s waitmeasured, 2 exploratory runsRR01 RUNLOG, “exploratory runs” section; no artifact published
30 s default for max_standby_streaming_delay, geo-routing to the nearest replicadocumentedSupabase blog “Read Replicas vs bigger compute”, dated 2026-01-15, doc-read 2026-10-10
get: true sends GET with arguments in the query stringsource readpostgrest-js rpc() at supabase-js commit 84e2c5d; not run
Auth on the primary, custom-domain bypass, GET-only replica endpoints, the 2025-04-04 geo-routing changedocumentedread replicas docs, doc-read 2026-10-08
Mirrored resources, 1.25x disk, Replica Compute Hours line, credits and spend cap exclusions, the $46.25 and $427.06 examplesdocumentedread replica usage, compute usage, disk size and cost-control docs, doc-read 2026-10-08
Per-size monthly compute pricesdocumentedpublic pricing page, doc-read 2026-10-08
Small has 2 GB of memory, the figure RR09’s 3.81 GB of heap is set againstdocumentedcompute and disk docs, doc-read 2026-11-09
Plans, AWS, Small, Postgres 15+, replica counts, general-region exclusion, upgrade and restore ruledocumentedgetting-started, regions and upgrading docs, doc-read 2026-10-08
load_balancer_redirect_identifier, the Source toggles, the lag metricdocumentedread replicas docs and the log field reference, doc-read 2026-10-08

One docs-vs-runtime disagreement, not filed upstream (filed: no): the docs describe geo-routing to “the closest available database (all read replicas + primary)”,1 and in RR02 the load balancer sent no read to the primary while the replica was down or removed. RR01’s routing results agree with the docs: GETs went to the nearest database and POSTs to the primary. Three gaps sit between the docs and the runtime: the same-region case, which MS06 created and RR03h measured (about half the GETs on each node) and whose split the docs’ load balancer section does not describe beyond “balances requests between your Primary database and Read Replicas”;1 the setup gate after a compute change (406 on the Pro org), which the getting-started prerequisites do not list (doc-read 2026-10-08); and the load balancer’s host, which the docs place on the API settings page and the Management API does not return (RR01e). RR06 and RR07 (2026-10-28) agree with the docs they test: custom-domain reads reached the primary only, as the read replica docs say,1 and OAuth and SAML named the custom host as callback, entity ID and ACS, as the custom domains docs say (read 2026-10-28).10 RR09e-f (2026-11-09) agree as well: cold reads through a custom host reached the primary only. RR08 agrees with the Postgres docs on what hot_standby_feedback prevents and costs.25

  1. Supabase, “Read Replicas,” Supabase Docs. https://supabase.com/docs/guides/platform/read-replicas ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15 ↩16 ↩17 ↩18 ↩19 ↩20 ↩21 ↩22 ↩23 ↩24 ↩25 ↩26 ↩27 ↩28 ↩29 ↩30 ↩31 ↩32 ↩33 ↩34 ↩35 ↩36 ↩37 ↩38

  2. Supabase, “postgrest-js PostgrestClient.ts, rpc(),” GitHub, commit 84e2c5d. https://github.com/supabase/supabase-js/blob/84e2c5d/packages/core/postgrest-js/src/PostgrestClient.ts ↩ ↩2 ↩3 ↩4

  3. Supabase, “Manage Read Replica usage,” Supabase Docs. https://supabase.com/docs/guides/platform/manage-your-usage/read-replicas ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15 ↩16 ↩17 ↩18

  4. Supabase, “Manage Disk Size usage,” Supabase Docs. https://supabase.com/docs/guides/platform/manage-your-usage/disk-size ↩ ↩2

  5. Supabase, “Manage Compute usage,” Supabase Docs. https://supabase.com/docs/guides/platform/manage-your-usage/compute ↩ ↩2

  6. Supabase, “Log sources and fields,” Supabase Docs. https://supabase.com/docs/guides/observability/log-field-reference ↩ ↩2 ↩3 ↩4

  7. PostgREST, “Surprising infinite retrying of SQL statement on a replica causes replication lag,” GitHub issue 3673. https://github.com/PostgREST/postgrest/issues/3673 ↩ ↩2

  8. Supabase, “Upgrading,” Supabase Docs. https://supabase.com/docs/guides/platform/upgrading ↩ ↩2 ↩3 ↩4

  9. Supabase, “postgrest-js fetchWithRetry.ts,” GitHub, supabase-js v2.118.0 (commit 6ede0cb). https://github.com/supabase/supabase-js/blob/6ede0cbfc880/packages/core/postgrest-js/src/fetchWithRetry.ts ↩

  10. Supabase, “Custom Domains,” Supabase Docs. https://supabase.com/docs/guides/platform/custom-domains ↩ ↩2

  11. Supabase, “Compute and Disk,” Supabase Docs. https://supabase.com/docs/guides/platform/compute-and-disk ↩

  12. PostgREST, “Transactions,” PostgREST Docs. https://docs.postgrest.org/en/stable/references/transactions.html ↩ ↩2 ↩3

  13. Supabase, “JavaScript: rpc(),” Supabase Docs. https://supabase.com/docs/reference/javascript/rpc ↩

  14. PostgREST, “Functions,” PostgREST Docs. https://docs.postgrest.org/en/stable/references/api/functions.html ↩

  15. Supabase, “Securing your API,” Supabase Docs. https://supabase.com/docs/guides/api/securing-your-api ↩

  16. Supabase, “Dedicated IPv4 Address for Ingress,” Supabase Docs. https://supabase.com/docs/guides/platform/ipv4-address ↩ ↩2

  17. Supabase, “Pricing,” Supabase. https://supabase.com/pricing ↩ ↩2

  18. Supabase, “Control your costs,” Supabase Docs. https://supabase.com/docs/guides/platform/cost-control ↩

  19. Supabase, “Getting started with Read Replicas,” Supabase Docs. https://supabase.com/docs/guides/platform/read-replicas/getting-started ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7

  20. Supabase, “Available regions,” Supabase Docs. https://supabase.com/docs/guides/platform/regions ↩

  21. Supabase, “Database Backups,” Supabase Docs. https://supabase.com/docs/guides/platform/backups ↩ ↩2

  22. Supabase, “Production Checklist,” Supabase Docs. https://supabase.com/docs/guides/deployment/going-into-prod ↩

  23. Supabase, “Read Replicas vs bigger compute,” Supabase Blog, 2026-01-15. https://supabase.com/blog/read-replicas-vs-bigger-compute ↩ ↩2

  24. Supabase, “Customizing Postgres configs,” Supabase Docs. https://supabase.com/docs/guides/database/custom-postgres-config ↩

  25. PostgreSQL Global Development Group, “Hot Standby,” PostgreSQL Documentation. https://www.postgresql.org/docs/current/hot-standby.html ↩ ↩2 ↩3

  26. PostgREST, “v16.0,” GitHub release, 2026-08-07. https://github.com/PostgREST/postgrest/releases/tag/v16.0 ↩ ↩2

  27. Supabase, “Query logs with SQL,” Supabase Docs. https://supabase.com/docs/guides/observability/advanced-log-filtering ↩