Softwr

Cloud & Infrastructure · head to head

Heroku vs PostgreSQL

Heroku logo

Heroku

Cloud & Infrastructure

Cloud Application Platform

From
$7/month
Rated
-
PostgreSQL logo

PostgreSQL

Database & Data Management

The world's most advanced open source relational database

From
Free
Rated
-

The short version

  • Only PostgreSQL has a free tier, so it costs nothing to try first.
  • Each has a real cost: Heroku there is no free dyno tier; the cheapest Eco dyno is $5 per month; PostgreSQL requires manual scaling across multiple machines for very large deployments
  • They diverge on capability: Heroku covers Git-based deployment, PostgreSQL covers ACID Compliance.

Where they differ

Only the attributes on which Heroku and PostgreSQL actually diverge.

Attributes where Heroku and PostgreSQL differ
AttributeHerokuPostgreSQL
Starting price$7/monthFree
Pricing modelsubscriptionUnknown
Free tierNoYes
PlatformsWeb, Api, WorkersLinux, Windows, macOS, BSD, Unix
CategoryCloud & InfrastructureDatabase & Data Management
Founded20071996

Identical on both: user rating (Not yet rated).

What each one covers

Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Heroku

  • Git-based deployment
  • Buildpacks
  • Dynos (containers)
  • Add-ons marketplace
  • Postgres database
  • Environment variables
  • Logging
  • API

Only in PostgreSQL

  • ACID Compliance
  • JSON/JSONB Support
  • Full-text Search
  • Extensibility
  • Advanced Indexing
  • Partitioning
  • Replication
  • pgAdmin

What people use each for

The jobs each tool is most often brought in to do.

Heroku

  • Deploying and scaling web applications with git push and no server administrationnot PostgreSQL
  • Running managed Postgres, Redis and Kafka as attached data servicesnot PostgreSQL
  • Isolated production environments in a Private Space for regulated workloadsnot PostgreSQL

PostgreSQL

  • Transaction processingnot Heroku
  • Data storagenot Heroku
  • Application backendnot Heroku
  • Reportingnot Heroku
  • Data analyticsnot Heroku

Where each one falls short

Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Heroku

  • There is no free dyno tier; the cheapest Eco dyno is $5 per month
  • Eco dynos sleep after 30 minutes of inactivity, are restricted to personal accounts and allow only 2 process types
  • Free SSL and 10 process types start at the Basic dyno at $7 per month
  • Private and Shield dyno types require a Private Space, which is billed on top of the dynos
  • Private Space dynos start at $250 per month for Private-M and $500 per month for Private-L
  • Dyno prices are per dyno per month, so an app with several process types multiplies the bill

PostgreSQL

  • Requires manual scaling across multiple machines for very large deployments
  • Performance tuning requires deep knowledge of database internals
  • No built-in graphical admin interface; command-line tools are primary method

Pricing, plan by plan

Heroku

$7/month
  • Hobby$7/month
    • 512MB RAM
    • Shared CPU
    • 1 web dyno
  • Standard$50/month
    • 512MB RAM
    • Dedicated CPU
    • Automatic scaling

PostgreSQL

Free

No published plan breakdown. See the PostgreSQL review.

Which should you pick?

Choose Heroku if

  • You need git-based deployment.
  • You work on Web, Api, Workers.
  • You also want buildpacks.

Choose PostgreSQL if

  • You need acid compliance.
  • You want to start without paying.
  • You work on Linux, Windows, macOS, BSD, Unix.
  • You also want json/jsonb support.

Questions people ask

Is Heroku or PostgreSQL better?
Neither clearly leads. Heroku starts at $7/month and PostgreSQL at Free, and user ratings are close enough to be indistinguishable. Choose on capability and platform support.
Which is cheaper, Heroku or PostgreSQL?
PostgreSQL has a free tier; the other does not. Paid plans start at $7/month for Heroku and Free for PostgreSQL.
Does Heroku or PostgreSQL run on more platforms?
Heroku runs on Web, Api, Workers. PostgreSQL runs on Linux, Windows, macOS, BSD, Unix.
Can I use PostgreSQL for free?
Yes. PostgreSQL has a free tier, so you can try it without paying. Heroku starts at $7/month.
What is Heroku best used for?
Heroku is most often used for deploying and scaling web applications with git push and no server administration, running managed postgres, redis and kafka as attached data services, isolated production environments in a private space for regulated workloads. Of those, deploying and scaling web applications with git push and no server administration and running managed postgres, redis and kafka as attached data services are not what PostgreSQL is typically brought in for.
What can Heroku do that PostgreSQL cannot?
Heroku covers Git-based deployment, Buildpacks, Dynos (containers), Add-ons marketplace. PostgreSQL covers ACID Compliance, JSON/JSONB Support, Full-text Search, Extensibility.

Answered from the vendors’ own pages

PostgreSQL: Is PostgreSQL completely free?

Yes. PostgreSQL is completely free and open source with no licensing fees or restrictions on use.

Source
PostgreSQL: What platforms does PostgreSQL run on?

PostgreSQL runs on all major operating systems including Linux, Windows, macOS, BSD, and commercial Unix variants, and has been proven highly scalable managing terabytes to petabytes of data.

Source
PostgreSQL: What procedural languages are supported?

PostgreSQL supports stored functions and procedures in multiple languages including PL/pgSQL, Perl, Python, Tcl, Java, JavaScript, R, and Rust.

Source
PostgreSQL: What is ACID compliance in PostgreSQL?

PostgreSQL has been ACID-compliant since 2001, ensuring data integrity through atomicity, consistency, isolation, and durability guarantees for all transactions.

Source
PostgreSQL: Does PostgreSQL support JSON data?

Yes. PostgreSQL supports JSON and JSONB data types for storing and querying JSON documents, along with XML and other document formats.

Source

Related pages

Other head to heads