Migrate to RunxBuild and earn up to $50 in hosting credit on your first deposit.

Calculate your savings
unxBuild
Back to Blog Explainer

The PostgreSQL License: What It Permits, How It Differs From MIT, BSD and GPL, and What It Means for a Product Built on Postgres

Sean

Platform Writer

Sep 13, 2026
7 min read

PostgreSQL is released under the PostgreSQL License, a permissive open-source license approved by the Open Source Initiative and similar in effect to MIT and BSD. You can use it, modify it, embed it, sell software built on it and run it as a service, without paying anyone and without releasing your own source code. The only obligation is to keep the copyright notice and the license text with any copy of the PostgreSQL code you distribute. It is not GPL, it has no copyleft, and because the code is owned by its community rather than a company, there is no single party able to change it.

The PostgreSQL License: What It Permits, How It Differs From MIT, BSD and GPL, and What It Means for a Product Built on Postgres

The search results are one-paragraph answers, and the paragraph above is that answer. The reason to keep reading is the set of questions a founder or a lawyer asks next: can we ship a closed-source product on it, what exactly do we have to include, how does this compare to the database whose license changed last year, and what happens to the extensions and the tools around Postgres, which are not all under the same terms.

Table of contents

The license, in full, and what each line does

The PostgreSQL License is short enough to read in a minute, which is part of why lawyers like it. Stripped of the names and years, it does three things.

  • Grants permission to use, copy, modify and distribute the software and its documentation for any purpose, without fee and without a written agreement.
  • Requires that the copyright notice and the two disclaimer paragraphs appear in all copies.
  • Disclaims warranties and liability.

That is the whole of it. There is no requirement to publish modifications, no requirement to license derived works the same way, no patent clause, no restriction on field of use, and no distinction between running it internally and selling it. The Open Source Initiative lists it as a distinct license and notes that to use it for your own project you name it as The PostgreSQL License and substitute your own copyright holder and year.

The historical name is the Postgres95 license, from the Berkeley release the project grew out of, and older documents refer to it as a BSD-style license. The text differs slightly from the BSD variants, which is why it has its own entry, but the effect is the same family.

What it means for a commercial product

The questions that matter in practice, with the answers the license gives.

  • Can we build a closed-source SaaS on Postgres? Yes. Running the database behind your application distributes nothing, and even if it did, the license does not require you to open your code.
  • Can we embed Postgres in a product we ship to customers? Yes. Include the copyright notice and license text somewhere in the distribution, typically a licenses file or an about screen.
  • Can we modify Postgres and keep the changes private? Yes. There is no obligation to contribute back, though most companies that fork find that maintaining a private fork costs more than upstreaming.
  • Can we offer Postgres itself as a hosted service and charge for it? Yes. This is precisely the scenario that made some other database vendors change their licenses, and PostgreSQL’s terms permit it without condition.
  • Do we owe anyone anything? No fees, no registration, no notification. Only the notice.

The backend PostgreSQL decisions post covers the technical choices that bite later; the licensing choice is the one that does not, and that is unusual enough to be worth saying plainly.

Compared with MIT, BSD, Apache and GPL

Permissive licenses differ in small clauses; copyleft licenses differ in kind.

  • MIT: nearly identical in effect. Use, modify, distribute, keep the notice. The PostgreSQL License adds an explicit statement about documentation and a slightly different disclaimer wording.
  • BSD 2-clause and 3-clause: the same family. The 3-clause version adds a clause forbidding use of the contributors’ names for endorsement; the PostgreSQL License does not have one.
  • Apache 2.0: permissive, but longer, with an explicit patent grant and a requirement to state changes in modified files. Some companies prefer it for the patent language; Postgres does not use it.
  • GPL: copyleft. If you distribute a program that incorporates GPL code, the whole program must be distributed under the GPL with source available. That is the license the other major open-source relational database is under, alongside a commercial license from its corporate owner for those who cannot accept the GPL terms.
  • Source-available licenses: not open source. Several databases moved to licenses that forbid offering the software as a competing service. Postgres has not, and its governance makes it structurally unable to.

For a product decision, the practical split is between permissive and everything else. Under permissive terms the license is a footnote. Under copyleft or source-available terms it is a design constraint that has to be checked every time the architecture changes.

Why it will not change

Database licensing changes have become a genre of news, and the reasonable question is whether Postgres could be next. The answer is that there is no one to do it. PostgreSQL is not owned by a company. The copyright is held collectively by the PostgreSQL Global Development Group, the code has thousands of contributors whose contributions were made under the existing terms, and relicensing would require every one of them to agree. The core team has said as much publicly, and the project’s structure means the statement is not a promise but a description.

The companies that sell Postgres-based products and services, of which there are many, compete on what they build around the database, not on controlling it. That is the correct reading of the license: the database is a commons, and the commercial layer sits on top.

The extensions and the tools are separate

The one place to be careful is around, not in, Postgres. Extensions, drivers, GUI clients, backup tools and forks each carry their own license, and they are not all permissive.

  • Most core-adjacent extensions and the official client libraries use the PostgreSQL License or a permissive equivalent.
  • Some popular extensions use GPL or AGPL, which matters if you distribute them with your product rather than just running them.
  • Some commercial forks and time-series or analytics layers use source-available licenses that restrict offering them as a service.
  • GUI clients and administration tools range from permissive to proprietary.

Check the license of each extension you enable, and check it again when you move to a managed provider, because a managed service can only offer the extensions its own terms allow. On RunxBuild a managed Postgres is the community database under its own license, with backups, connection limits and user management handled; the plan you pay for is the operating of it, not the right to use it, which nobody needs to buy.

How this fits the rest of the stack

A permissive license is one fewer thing to think about, and the PostgreSQL License is about as permissive as they come. What a product built on it actually pays for is the running: the instance, the backups, the connection limit, the storage. The RunxBuild hosting calculator shows a managed Postgres beside the service that talks to it and the storage it grows into, as separate line items. Keep the notice, pick the plan, and spend the legal budget somewhere it is needed.

Useful related references:

FAQ

What license does PostgreSQL use?

The PostgreSQL License, a permissive open-source license approved by the Open Source Initiative and historically called the Postgres95 license. It permits use, modification and distribution for any purpose, free of charge, provided the copyright notice and license text are kept with any copies.

Is PostgreSQL free for commercial use?

Yes. You can run it behind a closed-source product, embed it in software you sell, modify it privately, and offer it as a paid hosted service. There are no fees and no obligation to release your own source code. The only requirement is to include the copyright notice and license text when you distribute the PostgreSQL code itself.

Is the PostgreSQL License the same as MIT or BSD?

It is in the same permissive family and has nearly identical effect: use, modify, distribute, keep the notice. The wording differs enough that it is listed as its own license, and it lacks the 3-clause BSD endorsement restriction and the Apache 2.0 patent clause.

Is PostgreSQL under the GPL like MySQL?

No. MySQL is GPL-licensed and owned by a corporation that also sells a commercial license. PostgreSQL is permissively licensed and owned by its community, so there is no copyleft obligation and no commercial license to buy.

Will PostgreSQL ever change its license?

It is structurally unable to. The copyright is held collectively by thousands of contributors, relicensing would need all of them to agree, and no single company owns the project. The core team has stated the license will not change, and the governance makes that a description rather than a promise.

#postgresql license#is postgresql free for commercial use#postgresql license vs mit#postgresql vs mysql license#open source database license