Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Apply suggestions from code review

egor796d863d6ff5
diff --git a/apps/docs/pages/guides/realtime/postgres-changes.mdx b/apps/docs/pages/guides/realtime/postgres-changes.mdx
index ebf20553d5a..d007861f111 100644
--- a/apps/docs/pages/guides/realtime/postgres-changes.mdx
+++ b/apps/docs/pages/guides/realtime/postgres-changes.mdx
@@ -533,9 +533,9 @@ supabase.realtime.setAuth('fresh-token')
## Limitations
-Realtime's Postgres Changes feature has the following limitations in terms of performance at the current time. There is a bottleneck on the database side that limits the number of messages that can be streamed to subscribed clients.
+The current version of Realtime's Postgres Changes feature has some performance limitations to keep in mind. There can be a bottleneck on the database that limits the number of messages streamed to subscribed clients.
-The polling query that fetches the changes can only work in a single thread. This means that if you have a lot of changes happening in your database, the polling query will be blocked and will not be able to fetch the changes fast enough. This will result in a delay in the changes being sent to the subscribed clients until you will get timeouted. Additionally, the polling query works per each subscribed client, this means that each unique pair of `filters` and `JWT token` (logged-in user) will affect the performance of the polling query. In other words, RLS and filters can further limit the number of messages that can be streamed to subscribed clients.
+The polling query that fetches the changes is currently single-threaded. If you are frequently changing your database, the polling query may not be able to fetch the changes rapidly enough. The delivery of the changes will be delayed until you will get timeout. Additionally, there is a polling query per subscribed client, which means that each unique pair of `filters` and `JWT token` (logged-in user) affects the performance of the polling query. In other words, RLS and filters can further limit the number of messages that can be streamed to subscribed clients.
From our testing and observation of the performance of the polling query, we have found that the following limits are safe to use:
@@ -552,11 +552,11 @@ From our testing and observation of the performance of the polling query, we hav
| large and above | ✅ | ✅ | 1,000 | 1 | 1,000 | 431 |
| large and above | ✅ | ✅ | 5,000 | 0.2 (1 in 5 seconds) | 1,000 | 702 |
-If you want to use Realtime's Postgres Changes feature you should be aware of these limitations. And if you are planning to use this feature at scale, you should consider using separate table without RLS and filters for the purpose of streaming changes to subscribed clients. Another option is to use it on the server side only and restream the changes to your clients using a Realtime Broadcast because it does not have these limitations. And don't forget to run your own benchmarks to make sure that the performance is acceptable for your use case.
+If you want to use Realtime's Postgres Changes feature you should be aware of these limitations. And if you are using this feature at scale, you should consider using separate table without RLS and filters for the purpose of streaming changes to subscribed clients. Alternatively, you can use Realtime server-side only and then re-stream the changes to your clients using a Realtime Broadcast. Don't forget to run your own benchmarks to make sure that the performance is acceptable for your use case.
-We have ideas on how to improve Realtime's Postgres Changes in the future. Follow Supabase to stay up to date with the latest news and updates on this feature.
+We are making many improvements to Realtime's Postgres Changes.
-And if you are uncertain about the performance of your use case, please reach out using [Support Form](https://supabase.com/dashboard/support/new) and we will be happy to help you. We have a whole team of engineers that can advise you the solution that will work best for your usage scenario.
+If you are uncertain about the performance of your use case, please reach out using [Support Form](https://supabase.com/dashboard/support/new) and we will be happy to help you. We have a team of engineers that can advise you on the best solution for your use-case.
## More Realtime Quickstarts