mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
## 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>
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
// Shared copy for the Realtime throughput tables. Consumed both by the
|
|
// interactive component and by the markdown alternative in
|
|
// `internals/markdown-schema/RealtimeLimitsEstimator.ts`, so the headings and
|
|
// compute labels stay in sync. Keep this file free of React/browser imports.
|
|
|
|
export const COMPUTE_OPTIONS = [
|
|
{ value: 'micro', label: 'Micro' },
|
|
{ value: 'small', label: 'Small to medium' },
|
|
{ value: 'large', label: 'Large to 16XL' },
|
|
] as const
|
|
|
|
export const COMPUTE_LABELS: Record<string, string> = Object.fromEntries(
|
|
COMPUTE_OPTIONS.map((o) => [o.value, o.label])
|
|
)
|
|
|
|
// Input-parameter columns (only shown in the full/raw table).
|
|
export const THROUGHPUT_PARAM_HEADINGS = ['RLS', 'Connected clients'] as const
|
|
|
|
// Result columns (shown in both the current-selection table and the raw table).
|
|
export const THROUGHPUT_METRIC_HEADINGS = [
|
|
'Total DB changes /sec',
|
|
'Max messages per client /sec',
|
|
'Max total messages /sec',
|
|
'Latency p95',
|
|
] as const
|
|
|
|
export const THROUGHPUT_TABLE_HEADINGS = [
|
|
...THROUGHPUT_PARAM_HEADINGS,
|
|
...THROUGHPUT_METRIC_HEADINGS,
|
|
] as const
|