PostgreSQL logo

PostgreSQL

A powerful, open source object-relational database system
97.3K
79.2K
+ 1
3.5K

What is PostgreSQL?

PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions.
PostgreSQL is a tool in the Databases category of a tech stack.
PostgreSQL is an open source tool with 14.2K GitHub stars and 4.2K GitHub forks. Here’s a link to PostgreSQL's open source repository on GitHub

Who uses PostgreSQL?

Companies
6470 companies reportedly use PostgreSQL in their tech stacks, including Uber, Netflix, and Instagram.

Developers
85070 developers on StackShare have stated that they use PostgreSQL.

PostgreSQL Integrations

Datadog, Slick, Amazon DynamoDB, JSON, and Entity Framework are some of the popular tools that integrate with PostgreSQL. Here's a list of all 427 tools that integrate with PostgreSQL.
Pros of PostgreSQL
761
Relational database
510
High availability
439
Enterprise class database
383
Sql
304
Sql + nosql
173
Great community
147
Easy to setup
131
Heroku
130
Secure by default
113
Postgis
50
Supports Key-Value
48
Great JSON support
34
Cross platform
32
Extensible
28
Replication
26
Triggers
23
Rollback
22
Multiversion concurrency control
21
Open source
18
Heroku Add-on
17
Stable, Simple and Good Performance
15
Powerful
13
Lets be serious, what other SQL DB would you go for?
11
Good documentation
8
Free
8
Intelligent optimizer
8
Scalable
8
Reliable
7
Transactional DDL
7
Modern
6
One stop solution for all things sql no matter the os
5
Relational database with MVCC
5
Faster Development
4
Developer friendly
4
Full-Text Search
3
search
3
Great DB for Transactional system or Application
3
Open-source
3
Free version
3
Excellent source code
3
Relational datanbase
2
Text
2
Full-text
0
Native
Decisions about PostgreSQL

Here are some stack decisions, common use cases and reviews by companies and developers who chose PostgreSQL in their tech stack.

Shared insights

PostgreSQL is responsible for nearly all data storage, validation and integrity. We leverage constraints, functions and custom extensions to ensure we have only one source of truth for our data access rules and that those rules live as close to the data as possible. Call us crazy, but ORMs only lead to ruin and despair. PostgreSQL

See more
Simon Bettison
Managing Director at Bettison.org Limited · | 8 upvotes · 734.2K views
Shared insights
at

In 2012 we made the very difficult decision to entirely re-engineer our existing monolithic LAMP application from the ground up in order to address some growing concerns about it's long term viability as a platform.

Full application re-write is almost always never the answer, because of the risks involved. However the situation warranted drastic action as it was clear that the existing product was going to face severe scaling issues. We felt it better address these sooner rather than later and also take the opportunity to improve the international architecture and also to refactor the database in. order that it better matched the changes in core functionality.

PostgreSQL was chosen for its reputation as being solid ACID compliant database backend, it was available as an offering AWS RDS service which reduced the management overhead of us having to configure it ourselves. In order to reduce read load on the primary database we implemented an Elasticsearch layer for fast and scalable search operations. Synchronisation of these indexes was to be achieved through the use of Sidekiq's Redis based background workers on Amazon ElastiCache. Again the AWS solution here looked to be an easy way to keep our involvement in managing this part of the platform at a minimum. Allowing us to focus on our core business.

Rails ls was chosen for its ability to quickly get core functionality up and running, its MVC architecture and also its focus on Test Driven Development using RSpec and Selenium with Travis CI providing continual integration. We also liked Ruby for its terse, clean and elegant syntax. Though YMMV on that one!

Unicorn was chosen for its continual deployment and reputation as a reliable application server, nginx for its reputation as a fast and stable reverse-proxy. We also took advantage of the Amazon CloudFront CDN here to further improve performance by caching static assets globally.

We tried to strike a balance between having control over management and configuration of our core application with the convenience of being able to leverage AWS hosted services for ancillary functions (Amazon SES , Amazon SQS Amazon Route 53 all hosted securely inside Amazon VPC of course!).

Whilst there is some compromise here with potential vendor lock in, the tasks being performed by these ancillary services are no particularly specialised which should mitigate this risk. Furthermore we have already containerised the stack in our development using Docker environment, and looking to how best to bring this into production - potentially using Amazon EC2 Container Service

See more
Emanuel Evans
Senior Architect at Rainforest QA · | 20 upvotes · 1.5M views

We recently moved our main applications from Heroku to Kubernetes . The 3 main driving factors behind the switch were scalability (database size limits), security (the inability to set up PostgreSQL instances in private networks), and costs (GCP is cheaper for raw computing resources).

We prefer using managed services, so we are using Google Kubernetes Engine with Google Cloud SQL for PostgreSQL for our PostgreSQL databases and Google Cloud Memorystore for Redis . For our CI/CD pipeline, we are using CircleCI and Google Cloud Build to deploy applications managed with Helm . The new infrastructure is managed with Terraform .

Read the blog post to go more in depth.

See more
Joshua Dean Küpper
CEO at Scrayos UG (haftungsbeschränkt) · | 11 upvotes · 641.9K views

We primarily use MariaDB but use PostgreSQL as a part of GitLab , Sentry and Nextcloud , which (initially) forced us to use it anyways. While this isn't much of a decision – because we didn't have one (ha ha) – we learned to love the perks and advantages of PostgreSQL anyways. PostgreSQL's extension system makes it even more flexible than a lot of the other SQL-based DBs (that only offer stored procedures) and the additional JOIN options, the enhanced role management and the different authentication options came in really handy, when doing manual maintenance on the databases.

See more
Jelena Dedovic
Needs advice
on
PythonPython
and
TornadoTornado

Investigating Tortoise ORM and GINO ORM...

I need to introduce some async ORM with the current stack: Tornado with asyncio loop, AIOHTTP, with PostgreSQL and MSSQL. This project revolves heavily around realtime and due to the realtime requirements, blocking during database access is not acceptable.

Considering that these ORMs are both young projects, I wondered if anybody had some experience with similar stack and these async ORMs?

See more
Martin Johannesson
Senior Software Developer at IT Minds · | 14 upvotes · 2.7M views
Shared insights
at

At IT Minds we create customized internal or #B2B web and mobile apps. I have a go to stack that I pitch to our customers consisting of 3 core areas. 1) A data core #backend . 2) A micro #serverless #backend. 3) A user client #frontend.

For the Data Core I create a backend using TypeScript Node.js and with TypeORM connecting to a PostgreSQL Exposing an action based api with Apollo GraphQL

For the micro serverless backend, which purpose is verification for authentication, autorization, logins and the likes. It is created with Next.js api pages. Using MongoDB to store essential information, caching etc.

Finally the frontend is built with React using Next.js , TypeScript and @Apollo. We create the frontend as a PWA and have a AMP landing page by default.

See more

Blog Posts

Dec 8 2020 at 5:50PM

DigitalOcean

GitHubMySQLPostgreSQL+11
2
2343
Nov 20 2019 at 3:38AM

OneSignal

PostgreSQLRedisRuby+8
9
4616
Jul 9 2019 at 7:22PM

Blue Medora

DockerPostgreSQLNew Relic+8
11
2328

PostgreSQL Alternatives & Comparisons

What are some alternatives to PostgreSQL?
MySQL
The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
MariaDB
Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry. MariaDB is designed as a drop-in replacement of MySQL(R) with more features, new storage engines, fewer bugs, and better performance.
Oracle
Oracle Database is an RDBMS. An RDBMS that implements object-oriented features such as user-defined types, inheritance, and polymorphism is called an object-relational database management system (ORDBMS). Oracle Database has extended the relational model to an object-relational model, making it possible to store complex business models in a relational database.
MongoDB
MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
SQLite
SQLite is an embedded SQL database engine. Unlike most other SQL databases, SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file.
See all alternatives

PostgreSQL's Followers
79247 developers follow PostgreSQL to keep up with related blogs and decisions.