The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
update docs
Jonathan Summers-Muir4ed1d4d9c9b4
diff --git a/apps/docs/pages/guides/platform/database-size.mdx b/apps/docs/pages/guides/platform/database-size.mdxindex ec25d73509e..5d92884eb5f 100644--- a/apps/docs/pages/guides/platform/database-size.mdx+++ b/apps/docs/pages/guides/platform/database-size.mdx@@ -9,7 +9,7 @@ export const meta = {Database size refers to the _monthly average storage usage_, as reported by Postgres. This metric is reported in your project's [billing usage](https://app.supabase.com/project/_/settings/billing/usage) and is updated daily. As you read this document we will refer to "database size" and "disk size":- "Database size" is the total size of used storage from your database.-- "Disk size" describes the size of the underlying available storage.+- "Disk Storage size" describes the size of the underlying available storage.## Database space management@@ -23,7 +23,7 @@ selectfrom pg_database;```-This value is reported in the [database settings page](https://app.supabase.com/project/_/settings/database).+This value is reported in the [database report page](https://app.supabase.com/project/_/reports/database).Database Space is consumed primarily by your data, indexes, and materialized views. You can reduce your disk size by removing any of these and running a Vacuum operation.@@ -61,15 +61,17 @@ Supabase uses network-attached storage to balance performance with scalability.Pro and Enterprise projects have auto-scaling Disk Storage.-Disk storage expands automatically when the database reaches 90% of the disk size. The disk is expanded to be 50% larger (e.g., 8GB -> 12GB). Auto-scaling can only take place once every 6 hours. If within those 6 hours you reach 95% of the disk space, your project will enter read-only mode.+Disk Storage expands automatically when the database reaches 90% of the disk size. The disk is expanded to be 50% larger (e.g., 8GB -> 12GB). Auto-scaling can only take place once every 6 hours. If within those 6 hours you reach 95% of the disk space, your project will enter read-only mode.-<Admonition type="caution">+The maximum Disk Storage Size for Pro Tier is 64TB. If you need more than this, [contact us](https://app.supabase.com/support/new) to learn more about the Enterprise plan.-If you intend to import a lot of data into your database which requires multiple disk expansions then [reach out to our team](https://app.supabase.com/support/new). For example, uploading more than 1.5x the current size of your database storage will put your database into [read-only mode](#read-only-mode).+The Disk Storage Size can also be manually expanded in [Database settings page](https://app.supabase.com/project/_/settings/database). The maximum default you can expand the Disk Storage to is 200GB. If you wish to manually expand it any more than 200B, please [contact us](https://app.supabase.com/support/new) to discuss expanding the 200GB limit.-</Admonition>+<Admonition type="info">++You may want to import a lot of data into your database which requires multiple disk expansions; for example, uploading more than 1.5x the current size of your database storage will put your database into [read-only mode](#read-only-mode). If so, it is highly recommended you increase the Disk Storage Size manually on the [Database settings page](https://app.supabase.com/project/_/settings/database).-The maximum Disk Size for Pro Tier is 64TB. If you need more than this, [contact us](https://app.supabase.com/support/new) to learn more about the Enterprise plan.+</Admonition>### Free Tier Behaviordiff --git a/studio/components/interfaces/Settings/Database/DiskSizeConfiguration.tsx b/studio/components/interfaces/Settings/Database/DiskSizeConfiguration.tsxindex 1f551ab0de3..4fc47706a5e 100644--- a/studio/components/interfaces/Settings/Database/DiskSizeConfiguration.tsx+++ b/studio/components/interfaces/Settings/Database/DiskSizeConfiguration.tsx@@ -53,7 +53,7 @@ const DiskSizeConfiguration: FC<any> = ({ disabled = false }) => {await app.projects.fetchDetail(ref, (project) => meta.setProjectDetails(project))ui.setNotification({category: 'success',- message: `Succesfully updated disk size to values['new-disk-size'] GB`,+ message: `Succesfully updated disk size to ${values['new-disk-size']} GB`,})setShowResetDbPass(false)}@@ -66,6 +66,8 @@ const DiskSizeConfiguration: FC<any> = ({ disabled = false }) => {}const currentDiskSize = projectUsage?.disk_volume_size_gb ?? 0+ // to do, update with max_disk_volume_size_gb+ const maxDiskSize = 200const INITIAL_VALUES = {'new-disk-size': currentDiskSize,@@ -76,7 +78,7 @@ const DiskSizeConfiguration: FC<any> = ({ disabled = false }) => {.required('Please enter a GB amount you want to resize the disk up to.').moreThan(Number(currentDiskSize ?? 0), `Must be more than ${currentDiskSize} GB`)// to do, update with max_disk_volume_size_gb- .lessThan(200, 'Must be no more than 200 GB'),+ .lessThan(Number(maxDiskSize), 'Must be no more than 200 GB'),})return (@@ -90,7 +92,7 @@ const DiskSizeConfiguration: FC<any> = ({ disabled = false }) => {<div className="col-span-2 space-y-1">{projectUsage?.disk_volume_size_gb && (<span className="text-scale-1100 flex gap-2 items-baseline">- <span className="text-scale-1200">Current disk Size:</span>+ <span className="text-scale-1200">Current Disk Storage Size:</span><span className="text-scale-1200 text-xl">{currentDiskSize}<span className="text-scale-1200 text-sm">GB</span>@@ -152,14 +154,14 @@ const DiskSizeConfiguration: FC<any> = ({ disabled = false }) => {}><div>- If you are intending to use more than 8GB of disk space, then you will need to upgrade+ If you are intending to use more than 500MB of disk space, then you will need to upgradeto at least the Pro tier.</div></Alert>)}<Modal- header={<h5 className="text-sm text-scale-1200">Increase disk size</h5>}+ header={<h5 className="text-sm text-scale-1200">Increase Disk Storage Size</h5>}size="small"visible={showResetDbPass}loading={isUpdatingDiskSize}@@ -172,31 +174,44 @@ const DiskSizeConfiguration: FC<any> = ({ disabled = false }) => {validationSchema={diskSizeValidationSchema}onSubmit={confirmResetDbPass}>- {({ isSubmitting }: { isSubmitting: boolean }) => (- <>- <Modal.Content>- <div className="w-full space-y-8 py-8">- <InputNumber- id="new-disk-size"- label="New disk size"- labelOptional="GB"- required- />- </div>- </Modal.Content>- <Modal.Separator />- <Modal.Content>- <div className="flex space-x-2 justify-between pb-2">- <Button type="default" onClick={() => setShowResetDbPass(false)}>- Cancel- </Button>- <Button htmlType="submit" type="primary" loading={isSubmitting}>- Update disk size- </Button>- </div>- </Modal.Content>- </>- )}+ {({ isSubmitting }: { isSubmitting: boolean }) =>+ currentDiskSize >= maxDiskSize ? (+ <>+ <Alert+ withIcon+ variant="warning"+ title={'Maximum manual disk size increase reached'}+ >+ You cannot manually expand the disk size any more than {maxDiskSize} GB. If you+ need more than this, contact us to learn more about the Enterprise plan.+ </Alert>+ </>+ ) : (+ <>+ <Modal.Content>+ <div className="w-full space-y-8 py-8">+ <InputNumber+ id="new-disk-size"+ label="New disk size"+ labelOptional="GB"+ required+ />+ </div>+ </Modal.Content>+ <Modal.Separator />+ <Modal.Content>+ <div className="flex space-x-2 justify-between pb-2">+ <Button type="default" onClick={() => setShowResetDbPass(false)}>+ Cancel+ </Button>+ <Button htmlType="submit" type="primary" loading={isSubmitting}>+ Update disk size+ </Button>+ </div>+ </Modal.Content>+ </>+ )+ }</Form></Modal></div>