Reference

Vercel Postgres Pricing

Learn about the pricing for Vercel Postgres.
Table of Contents

Vercel Postgres is available on Hobby and Pro plans

Vercel Postgres prices are based on the amount of usage you have. This includes the number of databases, compute time, storage, written data, and data transfer.

The following table outlines the price for each resource according to the plan you are on:

Managed Infrastructure hobby and pro resources
Resource
Hobby Included
Pro Included
Pro Additional
60 HoursFirst 100 Hours$0.10 - 1 Compute Hour
N/AFirst 256 MB$0.10 - 1 GB
First DatabaseFirst Database$1.00 - Per 1 Database
First 256 MB IncludedFirst 256 MB Included$0.12 - 1 GB
N/AFirst 256 MB$0.096 - 1 GB

The table below shows the metrics for the Vercel Postgres section of the Usage dashboard.

To view information on managing each resource, select the resource link in the Metric column. To jump straight to guidance on optimization, select the corresponding resource link in the Optimize column.

Manage and Optimize pricing
Metric
Description
Priced
Optimize
Compute timeThe length of time your Postgres database is active and responding to requests, multipled by it's CPU factorYesLearn More
Data storageThe data stored across your Postgres storesYesLearn More
Data transferData transferred between your Postgres databases and compute endpointsYesLearn More
Written dataThe data written to all your Postgres databasesYesLearn More
DatabasesThe number of Postgres databases you have createdYesLearn More

Vercel Postgres is a serverless SQL database. It scales down automatically and up when queried.

If you do not perform queries, the database will go to sleep and you will not accrue compute time, written data, or data transfer costs. However, you will still be charged for data storage.

In addition, if your database is infrequently getting requests, it will take a longer time to boot (cold start). This additional compute time may increase the amount you will be charged.

To stop incurring usage or costs, you can do the following:

  • On-demand compute: stop querying the database or delete it
  • Data storage: delete the database (storage persists even if you stop querying it).
  • Written data: stop writing to the database or delete it.
  • Data transfer: stop querying the database or delete it.

See the manage and optimize Vercel Postgres usage section for more information on how to optimize your usage.

Database cost is calculated as the maximum number of databases per month for your account.

How Compute Time is Measured:

Compute time is calculated based on the active time of your database, multiplied by the number of CPUs available. The active time includes periods when the database is receiving requests and for a duration (default 5 minutes) after the last request is received. Following this period of inactivity, databases are automatically suspended, ceasing additional compute time accumulation.

  • Hobby: Databases are allocated 0.25 logical CPUs, with these settings fixed and not subject to modification.
  • Pro: Databases are initially set with 1 CPU. Users have the flexibility to adjust this setting, ranging from 0.25 to 7 CPUs, according to performance requirements.

Database Activity and Suspension:

Databases are considered active when processing requests or within the configured idle timeout period post the last request. If there are no incoming requests for a specified duration (default 300 seconds), the database scales down to zero, effectively pausing compute time billing.

Compute Configuration Options:

We cater to diverse application needs and budget considerations through adaptable compute configuration options:

  • Autoscaling: This Pro plan option permits setting a range for compute size, adaptable from 0.25 CPUs to 7 CPUs. It enables the system to automatically scale the computational resources in response to real-time demand, optimizing both costs and performance by dynamically adjusting compute capacity.

Vercel Postgres uses a small amount of compute time, included in your billed amount, to perform a periodic check to ensure that your database can start, read, and write data.

Storage is calculated as the monthly average of storage used across all Postgres databases in your account. Each Postgres database uses 33MB of storage space, even before any data is stored. This is the default storage footprint of the Postgres server itself.

Understanding Written Data:

Written data in our Postgres service is measured by the amount of data changes that are committed from compute resources to storage. This ensures the durability and integrity of your data within the database. It encompasses all operations that modify data within your tables, including:

  • Inserts: Adding new rows to your tables.
  • Updates: Modifying existing data within your tables.
  • Deletes: Removing rows from your tables.
  • Migrations: Any schema changes or data migrations that alter the structure or volume of your data. This includes adding, altering, or dropping tables and columns, as well as any bulk data modifications.

Each operation is logged, and it is the size of these logs that contributes to your written data volume. This means the volume of written data may be larger than the actual size of the data being manipulated due to the nature of these operations.

For Example:

  • Updating a single field in a row that is 1KB in size, 1000 times, results in 1MB of written data.
  • Deleting a 1KB row from a table also counts as writing 1KB of data.

Initial Written Data:

Upon the creation of a new database, our system automatically sets up the necessary structures and metadata to manage and operate the database effectively. This setup process includes:

  • Creation of system tables and indexes.
  • Initialization of transaction logs and other essential metadata.

As a result, even before any data is explicitly written to the database by the user, a certain amount of written data is recorded. Specifically, creating a new database in our Postgres service results in an initial written data report of 32MB. This initial data volume is a normal part of the database initialization process and is essential for the database's functionality.

Pricing for Written Data:

The cost associated with written data is calculated based on the total volume of written data (measured in GB) multiplied by the price per GB. It's important to understand that this includes both user-initiated data modifications and the initial written data from setting up new databases.

Why You Might See Written Data Charges:

  • Frequent Updates or Deletions: High volumes of update or delete operations can contribute significantly to written data volume.
  • Database Initialization: The initial setup of a database contributes to written data volume, as explained above.
  • System Operations: Background tasks and system maintenance operations that ensure the health and performance of your database also contribute to written data.

Data transfer is the volume of data transferred out of your database.

Vercel Postgres is free for Hobby users within the usage limits and is intended as a development database. Hobby plans include enough functionality to allow you to create and test your database.

Vercel will send you emails as you are nearing your usage limits. You will not pay for any additional usage. However, you will not be able to access Vercel Postgres if limits are exceeded. In this scenario, you will have to wait until 30 days have passed before using it again.

If you're upgrading to or downgrading from Pro, be sure to transfer your database .

Pro trials have the same limits as Hobby users. If those trial limits are exceeded, you will not be able to use Vercel Postgres unless you upgrade to a paid plan. During the trial, you can create a maximum of one database.

Vercel will send you emails as you are nearing your usage limits, but you will also be advised of any alerts within the dashboard. When your team exceeds the base limits for Vercel Postgres on Pro, you will pay for usage on-demand as you use it.

Pro teams can set up Spend Management to get notified or to automatically take action, such as using a webhook or pausing your projects when your usage hits a set spend amount.

Vercel Postgres is not currently available for Enterprise Teams.

Last updated on October 30, 2024