The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
pg_cron docs: warn about scheduling system maintenance (#18754)
Oliver Rice9894a87bbba8
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.tsindex c71089049f5..d3659a65846 100644--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts@@ -674,7 +674,7 @@ export const database: NavMenuConstant = {},{name: 'pg_cron: Job Scheduling',- url: '/guides/database/extensions/pgcron',+ url: '/guides/database/extensions/pg_cron',},{name: 'pg_graphql: GraphQL Support',diff --git a/apps/docs/pages/guides/database/extensions/pg_cron.mdx b/apps/docs/pages/guides/database/extensions/pg_cron.mdxindex 44cb15b07c3..5eb6e657edf 100644--- a/apps/docs/pages/guides/database/extensions/pg_cron.mdx+++ b/apps/docs/pages/guides/database/extensions/pg_cron.mdx@@ -61,6 +61,12 @@ The schedule uses the standard cron syntax, in which \* means "run every time peYou can use [crontab.guru](https://crontab.guru/) to help validate your cron schedules.+### Scheduling System Maintenance++Be extremely careful when setting up pg_cron jobs for system maintenance tasks as they can have unintended consequences. For instance, scheduling a command to terminate idle connections with `pg_terminate_backend(pid)` can disrupt critical background processes like nightly backups. Often, there is an existing Postgres setting e.g. `idle_session_timeout` that can perform these common maintenance tasks without the risk.++Reach out to [Supabase Support](https://supabase.com/support) if you're unsure if that applies to your use case.+## Examples### Delete data every week