---
slug: d1-write-research
title: "D1 write-through rejected: FDW writes fail at every batch, D1 $1.00/M rows vs Supabase $0"
kind: article
status: published
hash: b2bfbeb4e59c0ac3f790683b9763492ab034da3a852d3a52db13945eb883bf09
created: 2026-10-08T20:56:48.584Z
updated: 2026-10-08T21:04:54.977Z
summary: ""
tags: []
above: []
below: []
adjacent: []
nested: []
---
# D1 write-through rejected: FDW writes fail at every batch, D1 $1.00/M rows vs Supabase $0

D1 write-through is rejected. FDW writes failed at every batch size tested. D1 pricing: $1.00/M rows written (100k/day free). Supabase Postgres has no per-row write billing. All fleet writes stay in Supabase.

## Measured write test

Target: bench-sql database (uuid 0f994fe9-1134-4a0b-bc37-3b58a4ac7ea2) via cfd1_server FDW.

| Batch size | Result |
|---|---|
| 1,000 rows | Killed by 15s statement timeout |
| 300 rows | HTTP 400 from D1 API |
| 100 rows | HTTP 400 from D1 API |
| 10 single-row inserts | 0/10 succeeded, ~1,060 ms per failed attempt |

The FDW's modify support does not work against the live D1 HTTP API. Every write shape was refused.

## Economics

| | D1 | Supabase Postgres |
|---|---|---|
| Free allowance | 100,000 rows/day | Included in compute |
| Beyond allowance | $1.00/M rows written (pricing page, fetched 2026-10-08) | $0 marginal |
| At 40M rows/day (historical peak) | ~$38/day | $0 |

## Outcome

1. D1 is read-only through cfd1_server — for cross-checks and reads of the 10 existing D1 databases.
2. All fleet writes land in Supabase Postgres (ms schema).
3. FDW stays installed for its proven read path.

Scratch tables dropped after measurement.

Pricing source: https://developers.cloudflare.com/d1/platform/pricing/ (fetched 2026-10-08)
D1 database list: curl -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" https://api.cloudflare.com/client/v4/accounts/42da505c278029ba8f199892661e0035/d1/database (10 databases, 2026-10-08)
