PgCache is source-available software, licensed under the Elastic License 2.0 (ELv2).
Why this license
Source-available is a deliberate choice. ELv2 is not open-source, which is intentional. We want to build a community product, but we also want to be able to support the product for the long term.
On the community side, we’re excited to be building a product that is useful and freely accessible for all PostgreSQL users. ELv2 makes the code public: you can read it, build it, run it in production, modify it, and fork it for your own use.
On the more strategic side, we want to ensure that we are able to continue supporting PgCache for the long term, while supporting ourselves and our families. ELv2 helps us do this by putting a very specific protection in place for our business: under ELv2, you are not allowed to take PgCache and offer it to third parties as a hosted or managed service.
A permissive license (MIT, Apache) would let a cloud provider wrap PgCache, sell it as a managed service, and out-distribute us with our own code … which is exactly what’s happened to other infrastructure projects. ELv2 closes that one door and leaves every other door open. For the people actually using PgCache (running it, reading it, hacking on it) nothing is off-limits.
About the future
PgCache may stay source-available indefinitely. But one of the reasons we chose ELv2 is because it gives us the optionality to potentially (potentially!) make this fully open source in the future. We’re not promising that, and we’re not putting a date on it. But if the business ever gets to a point where we feel it is safe to open the code up entirely, that’ll be good news we’d love to be able to share.
In order to protect our optionality, we are adding a CLA to our code. This way we will be able to re-license if and when we decide to do so, without having to chase down every individual contributor to the project.
In summary
What you can do
- Run PgCache in production, internally, for free
- Read, audit, and modify the source
- Fork it and run your changes for your own use
- Build on top of it
- Contribute to it under the CLA
What you can’t do
- Offer PgCache to others as a hosted or managed service that exposes a substantial part of its functionality (i.e. resell it as SaaS)
- Strip out our license notices or trademarks
Questions about commercial or enterprise use? [email protected]
FAQ
Is PgCache open source?
No, PgCache is source-available. The code is public and you’re free to read it, run it, modify it, and self-host it. The only restriction is that you cannot resell PgCache to others as a managed service.
Can I run PgCache myself for free?
Yes. Self-hosting for your own use (including in production, if you choose to) is fully allowed under the Elastic License 2.0. Our paid product exists for convenience, packaging, updates, and support. We want people to use PgCache however suits them best, and our intent is to run a business that makes it beneficial to use our services, whenever it’s helpful.
Why not MIT or Apache?
Because a fully permissive license would let large cloud providers take PgCache, run it as a managed service, and compete with us using our own code. ELv2 protects us from that single use case. It’s something that has happened before to other software-as-infra projects, and we don’t know what our business will look like in the future. We think that ELv2 is a fair trade for the confidence that we will be able to stay independent and shipping, whatever comes our way.
Will you ever make it open source?
Maybe. We would like to, but there is too much we don’t know. We’re not committing to it and there’s no timeline. If it ever makes sense to open PgCache further, we’ll do it publicly and on purpose. Until then: source-available.