Files
supabase/apps/docs/internals/markdown-schema/RealtimeLimitsEstimator.ts
Filipe Cabaçoandgithub-actions[bot] 0a9a0eec92 chore: update pg changes documentation (#47593)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

update pg changes documentation

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Updated the Realtime Postgres Changes guide with a new, generalized
“Listening to specific events” section (including INSERT/UPDATE/DELETE/*
examples) and standardized `event` usage.
* Refreshed “Available filters” with a unified filter builder approach,
expanded operator reference, consistent Filter-string/tab patterns,
`not.` and `AND` guidance, and clearer limitations (including
delete-event filtering).
* Updated “Selecting specific columns” examples to match the latest
payload/subscription guidance.
* **Refactor**
* Simplified the Realtime limits estimator by removing filter-based
throughput inputs and related UI/table columns; throughput is now based
on compute add-on, RLS, and concurrency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-06 10:34:28 +01:00

36 lines
1.1 KiB
TypeScript

import {
COMPUTE_LABELS,
THROUGHPUT_TABLE_HEADINGS,
} from '../../components/RealtimeLimitsEstimator/RealtimeLimitsEstimator.constants'
import throughputTable from '../../data/realtime/throughput.json'
type Row = {
computeAddOn: string
rls: boolean
concurrency: number
maxDBChanges: number
maxMessagesPerClient: number
totalMessagesPerSecond: number
p95Latency: number
}
const headerRow = `| ${THROUGHPUT_TABLE_HEADINGS.join(' | ')} |`
const dividerRow = `| ${THROUGHPUT_TABLE_HEADINGS.map(() => '---').join(' | ')} |`
const renderGroup = (computeAddOn: string): string => {
const rows = (throughputTable as Row[]).filter((l) => l.computeAddOn === computeAddOn)
return `#### ${COMPUTE_LABELS[computeAddOn] ?? computeAddOn}
${headerRow}
${dividerRow}
${rows
.map(
(l) =>
`| ${l.rls ? 'Yes' : 'No'} | ${l.concurrency.toLocaleString()} | ${l.maxDBChanges} | ${l.maxMessagesPerClient} | ${l.totalMessagesPerSecond.toLocaleString()} | ${l.p95Latency}ms |`
)
.join('\n')}`
}
export const RealtimeLimitsEstimator = (): string =>
[...new Set((throughputTable as Row[]).map((l) => l.computeAddOn))].map(renderGroup).join('\n\n')