惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
M
MIT News - Artificial intelligence
MyScale Blog
MyScale Blog
博客园_首页
G
Google Developers Blog
博客园 - 【当耐特】
美团技术团队
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News
小众软件
小众软件
博客园 - 司徒正美
雷峰网
雷峰网
T
Tailwind CSS Blog
V
V2EX
博客园 - 三生石上(FineUI控件)
F
Fortinet All Blogs
罗磊的独立博客
量子位
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog

Heroku Dev Center Articles

Migrating from the Nginx Buildpack to Front-End Web CNB | Heroku Dev Center Migrating from create-react-app-buildpack to Front-End Web CNB | Heroku Dev Center How the Front-End Web Cloud Native Buildpack Works | Heroku Dev Center Deploying Front-End Web Apps on Heroku | Heroku Dev Center Understanding Heroku User Roles and Permissions | Heroku Dev Center Choosing the Right Apache Kafka on Heroku Plan | Heroku Dev Center Provisioning Apache Kafka on Heroku | Heroku Dev Center Managing Topics and Partitions on Apache Kafka on Heroku | Heroku Dev Center Apache Kafka on Heroku Version Support | Heroku Dev Center Changing the Plan of an Apache Kafka on Heroku Cluster | Heroku Dev Center Connecting to an Apache Kafka on Heroku Cluster | Heroku Dev Center Apache Kafka on Heroku Metrics Logs | Heroku Dev Center Heroku GitHub Enterprise Cloud Integration Using GitHub Apps | Heroku Dev Center Heroku Connect for Independent Software Vendors (ISV) | Heroku Dev Center Managed Inference and Agents API with Claude Opus 4.8 | Heroku Dev Center Heroku-26 Stack | Heroku Dev Center Connection Limits on Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Migrating to Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Manage Instance Pools on Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Provisioning Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Getting Started with Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Usage and Billing on Heroku Postgres Advanced (Limited GA) | Heroku Dev Center
Heroku Postgres Advanced Quotas (Limited GA) | Heroku Dev...
2026-05-19 · via Heroku Dev Center Articles

Table of Contents [expand]

  • Storage Quotas and Thresholds
  • Configure Quotas and Thresholds
  • View Quotas and Thresholds
  • Resolving Exceeded Thresholds
  • Additional Reading

Last updated May 18, 2026

Heroku Postgres Advanced is in limited general availability. To start creating and using Advanced databases, open a ticket with Heroku Support to request access. Subscribe to our changelog to stay informed of when Heroku Postgres Advanced is generally available.

You can set quotas and thresholds on Heroku Postgres Advanced to prevent going over certain database limits. This article describes the types of quotas you can set, types of actions you can trigger, and how to set and view quotas.

You can only set quotas and thresholds on Postgres Advanced databases. For information about storage capacity on non-Advanced plans, see Heroku Postgres Over Plan Capacity.

Storage Quotas and Thresholds

All Advanced databases include 100 GB of storage at no cost and you can use up to 100 TB of storage. Heroku charges for the additional storage you use over your included storage amount. To avoid going over the storage limit and incurring extra costs, configure quota thresholds on your storage usage.

Storage Threshold Types

You can set a warning threshold and a critical threshold in GB:

Threshold Description
warning Get an email notification when exceeding the configured threshold and get alerts in the CLI.
critical Get the configured enforcement action when exceeding the threshold.

Storage Enforcement Actions

You can select an enforcement action if you reach your critical threshold limit:

Enforcement Action Description
restrict We send an email and give a 7 day grace period for you to bring the database below limits. After 7 days if the database is still exceeding the threshold, we apply the restrict action.

After the grace period, we revoke CREATE and INSERT privileges and the database is limited to one connection. You can still read or delete the data in the database. Use this limited connection to bring your database into compliance and retain access to your data. Heroku restores full access when usage is below 80% of the configured threshold.

notify We send an email notifying your database has exceeded its critical threshold. The database storage can continue increasing and incurs costs if it exceeds the 100 GB included storage amount.
none We don’t send a notification or restrict database access. The database storage can continue increasing and incurs costs if it exceeds the 100 GB included storage amount.

Configure Quotas and Thresholds

To configure storage thresholds and an enforcement action on your database, use the heroku data:pg:quotas:update command. This example sets a warning threshold of 80 GB, a critical threshold of 95 GB, and an enforcement action of Notify if storage usage is over 95 GB.

$ heroku data:pg:quotas:update DATABASE -a example-app --type storage --warning 80 --critical 90 --enforcement-action notify
Updating storage quota on ⛁ DATABASE... done
=== Storage

Warning:            80.00 GB
Critical:           95.00 GB
Enforcement Action: Notify
Enforcement:        10.07 GB / 95.00 GB (10.60 %) (Within configured quotas)

View Quotas and Thresholds

You can also view your quotas with the data:pg:quotas command:

$ heroku data:pg:quotas DATABASE -a example-app
=== Storage

Warning:            80.00 GB
Critical:           90.00 GB

Enforcement Action: Notify
Enforcement:        10.07 GB /95.00 GB (10.60 %) (Within configured quotas)

Resolving Exceeded Thresholds

If you exceed your configured thresholds and want to either stop receiving notifications, avoid disruption to your service if you’re in the grace period, or restore full access after having your database restricted, you can either:

  • Delete data to get below your exceeded threshold
  • Optimize storage to get below your exceeded threshold
  • Adjust storage threshold elections

If you set an enforcement action of restrict, we restrict database access after the grace period and you can’t use DROP TABLE or DROP INDEX to reduce your storage usage. Use DELETE and TRUNCATE instead.

Delete Data

You can delete data by removing unnecessary data, old logs, or unused records in a psql session.

Use DELETE to delete rows in a table. For example, to delete records older than 30 days in a logs table:

$ heroku pg:psql HEROKU_POSTGRESQL_COBALT -a example-app
example-app::HEROKU_POSTGRESQL_COBALT=> DELETE FROM logs WHERE created_at < (now() - '30 days'::interval);

Use DROP TABLE to remove a table. For example, to drop the orders and transactions tables:

$ heroku data:pg:psql HEROKU_POSTGRESQL_COBALT -a example-app
example-app::HEROKU_POSTGRESQL_COBALT=> DROP TABLE orders, transactions;

Use TRUNCATE to delete all rows from a table. For example, to delete all rows from the logs table:

$ heroku data:pg:psql HEROKU_POSTGRESQL_COBALT -a example-app
example-app::HEROKU_POSTGRESQL_COBALT=> TRUNCATE TABLE logs;

Optimize Storage

You can optimize storage on your database by dropping unused indexes or archiving historical records in a psql session.

Use DROP INDEX to remove an index. For example, to drop an index named user_email_idx:

$ heroku data:pg:psql HEROKU_POSTGRESQL_COBALT -a example-app
example-app::HEROKU_POSTGRESQL_COBALT=> DROP INDEX CONCURRENTLY user_email_idx;

Adjust Thresholds

You can reconfigure your storage thresholds to get out of the exceeded range.

Additional Reading