Supabase Postgres Source Setup Guide on PeerDB Cloud
This is a guide on how to create a supabase PostgreSQL peer which you can use for replication in PeerDB.
PeerDB Cloud supports Supabase via IPv6 natively for seemless replication.
1
Creating a user with permissions and replication slot
Let’s create a new user for PeerDB with the necessary permissions suitable for CDC,
and also create a publication that we’ll use for replication. For this, you can head over to the SQL Editor for your Supabase Project.
Create a dedicated user for PeerDB:
CREATE USER peerdb_user PASSWORD 'some-password';
Grant schema-level, read-only access to the user you created in the previous step. The following example shows permissions for the public schema. Repeat these commands for each schema containing tables you want to replicate:
GRANT USAGE ON SCHEMA "public" TO peerdb_user; GRANT SELECT ON ALL TABLES IN SCHEMA "public" TO peerdb_user; ALTER DEFAULT PRIVILEGES IN SCHEMA "public" GRANT SELECT ON TABLES TO peerdb_user;
Grant replication privileges to the user:
ALTER USER peerdb_user WITH REPLICATION;
Create a publication with the tables you want to replicate. We strongly recommend only including the tables you need in the publication to avoid performance overhead.
Any table included in the publication must either have a primary key defined or have its replica identity configured to FULL.
To create a publication for specific tables:
CREATE PUBLICATION peerdb_publication FOR TABLE table_to_replicate, table_to_replicate2;
To create a publication for all tables in a specific schema:
CREATE PUBLICATION peerdb_publication FOR TABLES IN SCHEMA "public";
The peerdb_publication publication will contain the set of change events generated from the specified tables, and will later be used to create the MIRROR (replication).
User and publication commands
Click on Run to have a publication and a user ready.
Make sure to replace peerdb_user and peerdb_password with your desired username and password.Also, remember to use the same publication name when creating the mirror in PeerDB.
2
Create the Supabase Peer on PeerDB Cloud
Make sure you are signed in to your Supabase console for this step.
Creating the Supabase Peer in PeerDB Cloud is as simple as granting PeerDB access to your Supabase Project.
Head over to the PeerDB UI and click on Create Peer. Select Supabase as the source.
Select Supabase peer
You should be redirected to Supabase to authorize PeerDB to access your Supabase Project.
Make sure to select the correct organization from the dropdown and click on Authorize PeerDB.
Authorize PeerDB
You should now see a list of your Supabase Projects. Click on the project you want to create the peer for.
Select the Supabase Project
Once you select the project, you should see a screen like below with connection details filled in automatically.
Fill in the username and password you created earlier in the SQL Editor in Step 1.
Create the Supabase Peer
Click on Validate and once that’s green, you can go ahead and click on Create to create the peer!
The PeerDB user must not be restricted by RLS policies, as it can lead to missing data. You can disable RLS policies for the user by running the below command:
ALTER USER peerdb_user BYPASSRLS;
3
Increase max_slot_wal_keep_size
This is a recommended configuration change to ensure that large transactions/commits do not cause the replication slot to be dropped.
This step will restart your Supabase database and may cause a brief downtime.
You can increase the max_slot_wal_keep_size parameter for your Supabase database to a higher value (at least 100GB or 102400) by following the Supabase DocsFor better recommendation of this value you can contact the PeerDB team.
When creating the Mirror, make sure to reuse the same publication you created earlier in Step 1
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"PeerDB Docs: Setup your ETL in minutes with SQL.","colors":{"primary":"#248736","light":"#248736","dark":"#248736"},"favicon":"https://mintcdn.com/peerdb/MRN5BST_xrBv7brJ/favicon.png?fit=max\u0026auto=format\u0026n=MRN5BST_xrBv7brJ\u0026q=85\u0026s=bcb6625d7fc622364e8380f49bc07790","logo":{"light":"https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/logo/docs-logo-light.png?fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=90ac5de385106617a465b7ba4d33a28e","dark":"https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/logo/docs-logo-dark.png?fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=feffd926023e0bcf9c5d4282d426fe12"},"navbar":{"primary":{"type":"button","label":"Get Started","href":"https://app.peerdb.cloud"}},"footer":{"socials":{"github":"https://github.com/PeerDB-io"}},"integrations":{"ga4":{"measurementId":"G-1V9ZZCZMB7"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"peerdb","hasAudioNarration":false,"actualSubdomain":"peerdb","customDomains":["docs.peerdb.io"],"gitSource":{"type":"github","owner":"peerdb-io","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a8893018e352becf1ac8d39","collectionId":"dc037637-3209-4796-8664-2e77fd9c1f6c","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a8893018e352becf1ac8d39"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6a8893018e352becf1ac8d39:success","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"Documentation","count":75},{"language":"default","tag":"Setup","count":17},{"language":"default","tag":"API Reference","count":14},{"language":"default","tag":"API Endpoints","count":14},{"language":"default","tag":"Use-cases","count":12},{"language":"default","tag":"SQL Reference","count":10},{"language":"default","tag":"SQL Commands","count":10},{"language":"default","tag":"PostgreSQL Setup Guide","count":9},{"language":"default","tag":"Features","count":9},{"language":"default","tag":"Mirror","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"connect/postgres/supabase_postgres_peerdb_cloud","slug":"/connect/postgres/supabase_postgres_peerdb_cloud","pageMetadata":{"title":"Supabase Postgres Source Setup Guide on PeerDB Cloud","description":null,"href":"/connect/postgres/supabase_postgres_peerdb_cloud"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{Check,CodeBlock,Frame,Note,OptimizedImage,Step,Steps,Warning}=_components;if(!Check)_missingMdxReference(`Check`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This is a guide on how to create a supabase PostgreSQL peer which you can use for replication in PeerDB.`}),`\n`,_jsx(Check,{children:_jsx(_components.p,{children:`PeerDB Cloud supports Supabase via IPv6 natively for seemless replication.`})}),`\n`,_jsxs(Steps,{titleSize:`h2`,children:[_jsxs(Step,{title:`Creating a user with permissions and replication slot`,id:`creating-a-user-with-permissions-and-replication-slot`,children:[_jsxs(_components.p,{children:[`Let’s create a new user for PeerDB with the necessary permissions suitable for CDC,\nand also create a publication that we’ll use for replication. For this, you can head over to the `,_jsx(_components.strong,{children:`SQL Editor`}),` for your Supabase Project.`]}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Create a dedicated user for PeerDB:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` CREATE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` USER`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` peerdb_user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` PASSWORD`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'some-password'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Grant schema-level, read-only access to the user you created in the previous step. The following example shows permissions for the `,_jsx(_components.code,{children:`public`}),` schema. Repeat these commands for each schema containing tables you want to replicate:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` GRANT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` USAGE `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ON`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` SCHEMA`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"public\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` TO`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` peerdb_user;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` GRANT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` SELECT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` ON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ALL TABLES `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`IN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` SCHEMA`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"public\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` TO`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` peerdb_user;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` ALTER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` DEFAULT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PRIVILEGES `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`IN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` SCHEMA`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"public\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` GRANT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` SELECT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` ON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TABLES `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`TO`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` peerdb_user;`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Grant replication privileges to the user:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` ALTER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` USER`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` peerdb_user `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WITH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` REPLICATION;`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Create a `,_jsx(_components.a,{href:`https://www.postgresql.org/docs/current/logical-replication-publication.html`,children:`publication`}),` with the tables you want to replicate. We strongly recommend only including the tables you need in the publication to avoid performance overhead.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Any table included in the publication must either have a `,_jsx(_components.strong,{children:`primary key`}),` defined `,_jsx(_components.em,{children:`or`}),` have its `,_jsx(_components.strong,{children:`replica identity`}),` configured to `,_jsx(_components.code,{children:`FULL`}),`.`]})}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`To create a publication for specific tables:`}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` CREATE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PUBLICATION peerdb_publication `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FOR`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` TABLE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` table_to_replicate, table_to_replicate2;`})]}),`\n`]})})}),`\n`,_jsxs(_components.ol,{start:`2`,children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`To create a publication for all tables in a specific schema:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` CREATE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PUBLICATION peerdb_publication `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FOR`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TABLES `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`IN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` SCHEMA`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"public\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`peerdb_publication`}),` publication will contain the set of change events generated from the specified tables, and will later be used to create the MIRROR (replication).`]}),`\n`]}),`\n`]}),_jsx(Frame,{caption:`User and publication commands`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-commands.jpg?fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=bb684fa4de1d4c188e7a330effec551a`,\"data-og-width\":`2672`,width:`2672`,\"data-og-height\":`1156`,height:`1156`,\"data-path\":`images/supabase-setup-peerdb-cloud/supabase-commands.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-commands.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=8c20187b7657cc133321e14efcd9fe7f 280w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-commands.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=7752ced38b6b6cb73b1208479f64c343 560w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-commands.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=791d42b68a308d684b1989f2d7a006b3 840w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-commands.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=b38bfe0c622d26de74d0bea685b8b984 1100w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-commands.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=d9952d1529933192244304ec8dc5dacb 1650w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-commands.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=2f023ea7f6aecf732c742b80b1baf171 2500w`})}),_jsxs(_components.p,{children:[`Click on `,_jsx(_components.strong,{children:`Run`}),` to have a publication and a user ready.`]}),_jsxs(Note,{children:[_jsxs(_components.p,{children:[`Make sure to replace `,_jsx(_components.code,{children:`peerdb_user`}),` and `,_jsx(_components.code,{children:`peerdb_password`}),` with your desired username and password.`]}),_jsx(_components.p,{children:`Also, remember to use the same publication name when creating the mirror in PeerDB.`})]})]}),_jsxs(Step,{title:`Create the Supabase Peer on PeerDB Cloud`,id:`create-the-supabase-peer-on-peerdb-cloud`,children:[_jsx(Note,{children:_jsxs(_components.p,{children:[`Make sure you are signed in to your `,_jsx(_components.a,{href:`https://supabase.com/`,children:`Supabase console`}),` for this step.`]})}),_jsx(_components.p,{children:`Creating the Supabase Peer in PeerDB Cloud is as simple as granting PeerDB access to your Supabase Project.`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Head over to the PeerDB UI and click on `,_jsx(_components.strong,{children:`Create Peer`}),`. Select `,_jsx(_components.strong,{children:`Supabase`}),` as the source.`]}),`\n`]}),_jsx(Frame,{caption:`Select Supabase peer`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/select-supabase-peer.jpg?fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=271c5d14e8623d01614289250ba9f252`,\"data-og-width\":`3990`,width:`3990`,\"data-og-height\":`2172`,height:`2172`,\"data-path\":`images/supabase-setup-peerdb-cloud/select-supabase-peer.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/select-supabase-peer.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=9e6946b64dd86421ce56964fb8cb0968 280w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/select-supabase-peer.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=149dee0b31c9a516afe81f1e4a136bbe 560w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/select-supabase-peer.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=2634622c68600bb5c687f0682c6711f9 840w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/select-supabase-peer.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=276668f77e82df766cf9a0cff6abfb37 1100w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/select-supabase-peer.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=08e14f2c3ccc81bea722e6db8920b10e 1650w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/select-supabase-peer.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=a9f1d17f319f02b89f487385fb616a5d 2500w`})}),_jsxs(_components.ol,{start:`2`,children:[`\n`,_jsxs(_components.li,{children:[`You should be redirected to Supabase to authorize PeerDB to access your Supabase Project.\nMake sure to select the correct organization from the dropdown and click on `,_jsx(_components.strong,{children:`Authorize PeerDB`}),`.`]}),`\n`]}),_jsx(Frame,{caption:`Authorize PeerDB`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/authorize-peerdb.jpg?fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=e8721a667dcfd92018a6c7dabb0628a2`,\"data-og-width\":`1642`,width:`1642`,\"data-og-height\":`1404`,height:`1404`,\"data-path\":`images/supabase-setup-peerdb-cloud/authorize-peerdb.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/authorize-peerdb.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=88386312c23a75928432266b80b231f4 280w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/authorize-peerdb.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=cbd742548c9cb53993d07bfead9d398b 560w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/authorize-peerdb.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=dec23ed170b3b32943aef7f464ba3b1f 840w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/authorize-peerdb.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=33d0f539babdbcf9ac457d1d49d98ebf 1100w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/authorize-peerdb.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=889a6da91dae2d18011019a05fd5e2fa 1650w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/authorize-peerdb.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=07ed96378e1da130a774647d780a6315 2500w`})}),_jsxs(_components.ol,{start:`3`,children:[`\n`,_jsx(_components.li,{children:`You should now see a list of your Supabase Projects. Click on the project you want to create the peer for.`}),`\n`]}),_jsx(Frame,{caption:`Select the Supabase Project`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-app-projects.jpg?fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=05b82489fdaa024037102c39bc868c81`,\"data-og-width\":`3990`,width:`3990`,\"data-og-height\":`2024`,height:`2024`,\"data-path\":`images/supabase-setup-peerdb-cloud/supabase-app-projects.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-app-projects.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=f9df2488120a3b6cd6c18ed26aa02fe9 280w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-app-projects.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=4c02f551b2dbc39e25b4e0965a0177fe 560w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-app-projects.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=e47a96131ce92677834f11ef9e151d8c 840w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-app-projects.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=f371098462617ce1c278d2bdd4d0d483 1100w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-app-projects.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=e12dcb1a3e568e1417e13fdf736588d7 1650w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-app-projects.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=036015cacca0675b07ad805a851a0fd3 2500w`})}),_jsxs(_components.ol,{start:`4`,children:[`\n`,_jsx(_components.li,{children:`Once you select the project, you should see a screen like below with connection details filled in automatically.\nFill in the username and password you created earlier in the SQL Editor in Step 1.`}),`\n`]}),_jsx(Frame,{caption:`Create the Supabase Peer`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-peer.jpg?fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=ed417b6ab3e233e61f1d5089f572ea30`,\"data-og-width\":`3990`,width:`3990`,\"data-og-height\":`2172`,height:`2172`,\"data-path\":`images/supabase-setup-peerdb-cloud/supabase-peer.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-peer.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=14f3f9bf36d74d6353f355997153db8d 280w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-peer.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=e88c7aeb63d022544e3d26ec78ac1962 560w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-peer.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=78942f4592c57d6e3da2d0ca55e9ee16 840w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-peer.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=5c266d62cd4ba9f7a64cf876f7df0fca 1100w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-peer.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=8cd611cedee3b6224601cf4041fd7edd 1650w, https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/images/supabase-setup-peerdb-cloud/supabase-peer.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=bb2787e42f154f78179c02635652f67a 2500w`})}),_jsxs(_components.ol,{start:`5`,children:[`\n`,_jsxs(_components.li,{children:[`Click on `,_jsx(_components.strong,{children:`Validate`}),` and once that’s green, you can go ahead and click on `,_jsx(_components.strong,{children:`Create`}),` to create the peer!`]}),`\n`]}),_jsxs(Note,{children:[_jsx(_components.p,{children:`The PeerDB user must not be restricted by RLS policies, as it can lead to missing data. You can disable RLS policies for the user by running the below command:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ALTER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` USER`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` peerdb_user BYPASSRLS;`})]}),`\n`]})})})]})]}),_jsxs(Step,{title:`Increase max_slot_wal_keep_size`,id:`increase-max_slot_wal_keep_size`,children:[_jsx(_components.p,{children:`This is a recommended configuration change to ensure that large transactions/commits do not cause the replication slot to be dropped.`}),_jsx(Warning,{children:_jsx(_components.p,{children:`This step will restart your Supabase database and may cause a brief downtime.`})}),_jsxs(_components.p,{children:[`You can increase the `,_jsx(_components.code,{children:`max_slot_wal_keep_size`}),` parameter for your Supabase database to a higher value (at least 100GB or `,_jsx(_components.code,{children:`102400`}),`) by following the `,_jsx(_components.a,{href:`https://supabase.com/docs/guides/database/custom-postgres-config#cli-supported-parameters`,children:`Supabase Docs`})]}),_jsx(_components.p,{children:`For better recommendation of this value you can contact the PeerDB team.`})]})]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`When creating the Mirror, make sure to reuse the same publication you created earlier in Step 1`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Supabase Postgres Source Setup Guide on PeerDB Cloud","description":null,"href":"/connect/postgres/supabase_postgres_peerdb_cloud"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Creating a user with permissions and replication slot","slug":"creating-a-user-with-permissions-and-replication-slot","depth":2,"children":[]},{"title":"Create the Supabase Peer on PeerDB Cloud","slug":"create-the-supabase-peer-on-peerdb-cloud","depth":2,"children":[]},{"title":"Increase max_slot_wal_keep_size","slug":"increase-max_slot_wal_keep_size","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"peerdb","siteName":"PeerDB Docs: Setup your ETL in minutes with SQL.","title":"Supabase Postgres Source Setup Guide on PeerDB Cloud - PeerDB Docs: Setup your ETL in minutes with SQL.","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-21T18:07:55.660Z","originalFileLocation":"connect/postgres/supabase_postgres_peerdb_cloud.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"PeerDB Docs: Setup your ETL in minutes with SQL.\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/peerdb/AsJEjbO1FwDhXakS/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/peerdb/AsJEjbO1FwDhXakS/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/peerdb/AsJEjbO1FwDhXakS/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/peerdb/AsJEjbO1FwDhXakS/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/peerdb/AsJEjbO1FwDhXakS/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/peerdb/AsJEjbO1FwDhXakS/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/peerdb/AsJEjbO1FwDhXakS/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/peerdb/AsJEjbO1FwDhXakS/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/peerdb/AsJEjbO1FwDhXakS/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Supabase Postgres Source Setup Guide on PeerDB Cloud - PeerDB Docs: Setup your ETL in minutes with SQL.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PeerDB Docs: Setup your ETL in minutes with SQL.\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.peerdb.io/connect/postgres/supabase_postgres_peerdb_cloud\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://peerdb.mintlify.app/_mintlify/api/og/v2?division=PostgreSQL+Setup+Guide\u0026amp;title=Supabase+Postgres+Source+Setup+Guide+on+PeerDB+Cloud\u0026amp;theme=fca96d2023807749157a0c65\u0026amp;signature=6a22a7518c064292007b812f21448ce320159324502e05df554354b203e661cf\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Supabase Postgres Source Setup Guide on PeerDB Cloud - PeerDB Docs: Setup your ETL in minutes with SQL.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://peerdb.mintlify.app/_mintlify/api/og/v2?division=PostgreSQL+Setup+Guide\u0026amp;title=Supabase+Postgres+Source+Setup+Guide+on+PeerDB+Cloud\u0026amp;theme=fca96d2023807749157a0c65\u0026amp;signature=6a22a7518c064292007b812f21448ce320159324502e05df554354b203e661cf\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/peerdb/AsJEjbO1FwDhXakS/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"PeerDB Docs: Setup your ETL in minutes with SQL.\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#248736\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.peerdb.io/connect/postgres/supabase_postgres_peerdb_cloud\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/connect/postgres/supabase_postgres_peerdb_cloud.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.peerdb.io/#organization\",\"name\":\"PeerDB Docs: Setup your ETL in minutes with SQL.\",\"url\":\"https://docs.peerdb.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/peerdb/wtgPI5cQwjI2FO0m/logo/docs-logo-light.png?fit=max\u0026auto=format\u0026n=wtgPI5cQwjI2FO0m\u0026q=85\u0026s=90ac5de385106617a465b7ba4d33a28e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.peerdb.io#website\",\"name\":\"PeerDB Docs: Setup your ETL in minutes with SQL.\",\"url\":\"https://docs.peerdb.io\",\"publisher\":{\"@id\":\"https://docs.peerdb.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.peerdb.io/connect/postgres/supabase_postgres_peerdb_cloud#webpage\",\"url\":\"https://docs.peerdb.io/connect/postgres/supabase_postgres_peerdb_cloud\",\"name\":\"Supabase Postgres Source Setup Guide on PeerDB Cloud\",\"dateModified\":\"2026-08-21T18:07:55.660Z\",\"isPartOf\":{\"@id\":\"https://docs.peerdb.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.peerdb.io/connect/postgres/supabase_postgres_peerdb_cloud#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.peerdb.io/connect/postgres/supabase_postgres_peerdb_cloud#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Setup\",\"item\":\"https://docs.peerdb.io/connect/postgres/rds_postgres\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL Setup Guide\",\"item\":\"https://docs.peerdb.io/connect/postgres/rds_postgres\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Supabase Postgres Source Setup Guide on PeerDB Cloud\",\"item\":\"https://docs.peerdb.io/connect/postgres/supabase_postgres_peerdb_cloud\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.peerdb.io/connect/postgres/supabase_postgres_peerdb_cloud#article\",\"headline\":\"Supabase Postgres Source Setup Guide on PeerDB Cloud\",\"name\":\"Supabase Postgres Source Setup Guide on PeerDB Cloud\",\"url\":\"https://docs.peerdb.io/connect/postgres/supabase_postgres_peerdb_cloud\",\"mainEntityOfPage\":{\"@id\":\"https://docs.peerdb.io/connect/postgres/supabase_postgres_peerdb_cloud#webpage\"},\"dateModified\":\"2026-08-21T18:07:55.660Z\",\"publisher\":{\"@id\":\"https://docs.peerdb.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.peerdb.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"PeerDB Docs: Setup your ETL in minutes with SQL.\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"PeerDB Docs: Setup your ETL in minutes with SQL.","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Home","pages":[{"title":"PeerDB","href":"/introduction"},{"title":"Architecture Overview","href":"/architecture"},{"title":"Why choose PeerDB over other tools?","href":"/why-peerdb"}]},{"group":"Quickstart","pages":[{"title":"Quickstart Guide","href":"/quickstart/quickstart"},{"title":"PeerDB Streams for Kafka Quickstart Guide","href":"/quickstart/streams-quickstart"},{"title":"SQL Quickstart Guide","href":"/quickstart/sql-quickstart"}]},{"group":"PeerDB Cloud","pages":[{"title":"PeerDB Cloud Quickstart Guide","icon":"rocket","iconType":"solid","href":"/peerdb-cloud/cloud-quickstart"},{"title":"PeerDB Cloud Security","icon":"lock","iconType":"solid","href":"/peerdb-cloud/cloud-security"},{"title":"PeerDB Cloud Pricing FAQ","icon":"question","iconType":"solid","href":"/peerdb-cloud/peerdb-cloud-pricing-faq"},{"title":"Trust Center","url":"https://trust.peerdb.io/","icon":"shield-halved","iconType":"solid","href":"/peerdb-cloud/cloud-trust-center"},{"title":"Public IPs For PeerDB Cloud","icon":"server","iconType":"regular","href":"/peerdb-cloud/ip-table"},{"title":"AWS Private Link","icon":"diagram-project","iconType":"solid","href":"/peerdb-cloud/aws-private-link"}]},{"group":"Setup","pages":[{"group":"PostgreSQL Setup Guide","pages":[{"title":"RDS Postgres Source Setup Guide","description":null,"href":"/connect/postgres/rds_postgres"},{"title":"Supabase Postgres Source Setup Guide on PeerDB Cloud","href":"/connect/postgres/supabase_postgres_peerdb_cloud"},{"title":"Supabase Postgres Source Setup Guide","description":null,"href":"/connect/postgres/supabase_postgres"},{"title":"Google CloudSQL Postgres Source Setup Guide","href":"/connect/postgres/cloudsql_postgres"},{"title":"Azure Flexible Server Postgres Source Setup Guide","href":"/connect/postgres/azure_flexible_server_postgres"},{"title":"Crunchy Bridge Postgres Source Setup Guide","href":"/connect/postgres/crunchy_bridge"},{"title":"Neon Postgres Source Setup Guide","href":"/connect/postgres/neon_postgres"},{"title":"Generic PostgreSQL Source Setup Guide","href":"/connect/postgres/generic_postgres"},{"title":"Unsupported PostgreSQL Providers","href":"/connect/postgres/unsupported_providers"}]},{"title":"CockroachDB Source Setup Guide","href":"/connect/cockroachdb"},{"group":"Clickhouse Setup Guide","pages":[{"title":"ClickHouse Cloud Setup Guide","href":"/connect/clickhouse/clickhouse-cloud"},{"title":"ClickHouse Setup Guide","href":"/connect/clickhouse/clickhouse"}]},{"title":"Snowflake Setup Guide","href":"/connect/snowflake"},{"title":"BigQuery Setup Guide","href":"/connect/bigquery"},{"title":"GCS Setup Guide","href":"/connect/gcs"},{"title":"S3 Setup Guide","href":"/connect/s3"},{"title":"Elasticsearch Setup Guide","href":"/connect/elasticsearch"}]},{"group":"Queues Setup","pages":[{"title":"Kafka Setup Guide","href":"/connect/kafka"},{"title":"Confluent Cloud Setup Guide","href":"/connect/confluent-cloud"},{"title":"PubSub Setup Guide","href":"/connect/pubsub"}]},{"group":"Mirror","pages":[{"title":"CDC Setup from Postgres to ClickHouse","href":"/mirror/cdc-pg-clickhouse"},{"title":"CDC Setup from Supabase to ClickHouse","href":"/mirror/cdc-supabase-clickhouse"},{"title":"CDC Setup from Neon Postgres to ClickHouse","href":"/mirror/cdc-neon-clickhouse"},{"title":"CDC Setup from Postgres to Bigquery","href":"/mirror/cdc-pg-bq"},{"title":"CDC Setup from Postgres to Snowflake","href":"/mirror/cdc-pg-sf"},{"title":"CDC Setup from Postgres to Postgres","href":"/mirror/cdc-pg-pg"},{"title":"CDC Setup from Postgres to Kafka","href":"/mirror/cdc-pg-kafka"},{"title":"CDC Setup from Postgres to Elasticsearch","href":"/mirror/cdc-pg-elasticsearch"},{"title":null,"href":"/mirror/upgrade"}]},{"group":"5-minute Tutorials","pages":[{"title":"Streaming Query Replication of PostgreSQL To Snowflake","href":"/tutorials/realtime-streaming-of-query-results"}]},{"group":"Features","pages":[{"title":"Pausing a CDC Mirror","href":"/features/pause-mirror"},{"title":"Editing a CDC Mirror","href":"/features/edit-mirror"},{"title":"Resyncing a CDC Mirror","href":"/features/resync-mirror"},{"title":"Schema Changes Propagation Support","href":"/features/schema-changes"},{"title":null,"href":"/features/replicating-partitioned-tables"},{"title":null,"href":"/features/feature-matrix"},{"title":null,"href":"/features/supported-connectors"},{"group":"Alerting","pages":[{"title":"Slack Alerting","href":"/features/alerting/slack-alerting"},{"title":"Email Alerting","href":"/features/alerting/email-alerting"}]}]},{"group":"Data types","pages":[{"title":null,"href":"/datatypes/datatype-matrix"}]},{"group":"Best practices","pages":[{"title":"Postgres to ClickHouse: Data Modeling Tips","href":"/bestpractices/clickhouse_datamodeling"},{"title":"Heartbeat Table For CDC","href":"/bestpractices/heartbeat"},{"title":"Upgrading the PostgreSQL Peer Of An Ongoing CDC Mirror","href":"/bestpractices/postgres-upgrade"},{"title":"Generated Columns: Gotchas and Best Practices","href":"/bestpractices/generated_columns"},{"title":"Postgres to ClickHouse: Handling TOAST Columns","href":"/bestpractices/clickhouse_toast_columns"},{"title":"Defining the Ordering Key in ClickHouse differently from the Primary Key in Postgres","href":"/bestpractices/ordering-key-different"}]},{"group":"Use-cases","pages":[{"group":"Real-time Change Data Capture from Postgres","pages":[{"title":"Overview","href":"/usecases/real-time-cdc/overview"},{"title":"PostgreSQL To PostgreSQL","href":"/usecases/real-time-cdc/postgres-to-postgres"},{"title":"PostgreSQL to BigQuery","href":"/usecases/real-time-cdc/postgres-to-bigquery"},{"title":"PostgreSQL To Snowflake","href":"/usecases/real-time-cdc/postgres-to-snowflake"},{"title":"PostgreSQL To Azure Event Hubs","href":"/usecases/real-time-cdc/postgres-to-azure-eventhubs"},{"title":"PostgreSQL To AWS S3 And Google Cloud Storage","href":"/usecases/real-time-cdc/postgres-to-cloud"}]},{"group":"Streaming Query Replication","pages":[{"title":"Overview","href":"/usecases/streaming-query-replication/overview"},{"title":"PostgreSQL to PostgreSQL","href":"/usecases/streaming-query-replication/postgres-to-postgres"},{"title":"PostgreSQL to BigQuery","href":"/usecases/streaming-query-replication/postgres-to-bigquery"},{"title":"PostgreSQL to S3","href":"/usecases/streaming-query-replication/postgres-to-s3"},{"title":"PostgreSQL to Snowflake","href":"/usecases/streaming-query-replication/postgres-to-snowflake"}]},{"title":"Query Federation via PostgreSQL","href":"/usecases/postgres-compatible-layer-for-bigquery-and-snowflake"}]},{"group":"Benchmarks","pages":[{"title":null,"href":"/benchmarks/benchmarking-Postgres-Replication:-PeerDB-vs-Airbyte"}]},{"group":"Contributing","pages":[{"title":"Running Flow tests","href":"/dev/running-tests"}]},{"group":"Metrics and Tuning","pages":[{"title":"Config Tuning for Change Data Capture (CDC)","href":"/metrics/important_cdc_configs"},{"title":"Native Metrics","href":"/metrics/native-metrics"}]},{"group":"FAQs","pages":[{"title":"Frequently Asked Questions","href":"/faqs/faqs"}]}]},{"anchor":"SQL Reference","icon":"rectangle-terminal","pages":[{"title":"SQL Reference","href":"/sql/reference"}]},{"anchor":"API Reference","icon":"browser","pages":[{"title":"API Reference","href":"/peerdb-api/reference"}]},{"anchor":"Lua Reference","icon":"file-code","pages":[{"title":"Lua Reference","href":"/lua/reference"}]},{"anchor":"GitHub","href":"https://github.com/PeerDB-io/peerdb","icon":"github"},{"anchor":"Changelog","href":"https://github.com/PeerDB-io/peerdb/releases","icon":"list"},{"anchor":"Community","href":"https://slack.peerdb.io","icon":"slack"}]},"basePath":"","title":"Supabase Postgres Source Setup Guide on PeerDB Cloud - PeerDB Docs: Setup your ETL in minutes with SQL.","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DW6UFrUy.js","DynamicMarkdown-B62XqCSI.js","zoom-image-lightbox-eHyQ0tlO.js","lightbox-handle-r17bVUz3.js"]}