Citus vs PostgreSQL

Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Citus
Citus

28
26
+ 1
8
PostgreSQL
PostgreSQL

17.4K
13.2K
+ 1
3.4K
Add tool

Citus vs PostgreSQL: What are the differences?

Developers describe Citus as "Worry-free Postgres for SaaS. Built to scale out". Citus is worry-free Postgres for SaaS. Made to scale out, Citus is an extension to Postgres that distributes queries across any number of servers. Citus is available as open source, as on-prem software, and as a fully-managed service. On the other hand, PostgreSQL is detailed as "A powerful, open source object-relational database system". 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.

Citus and PostgreSQL can be categorized as "Databases" tools.

"Multi-core Parallel Processing" is the primary reason why developers consider Citus over the competitors, whereas "Relational database" was stated as the key factor in picking PostgreSQL.

Citus and PostgreSQL are both open source tools. PostgreSQL with 5.44K GitHub stars and 1.8K forks on GitHub appears to be more popular than Citus with 3.64K GitHub stars and 273 GitHub forks.

What is Citus?

It's an extension to Postgres that distributes data and queries in a cluster of multiple machines. Its query engine parallelizes incoming SQL queries across these servers to enable human real-time (less than a second) responses on large datasets.

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.
Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Why do developers choose Citus?
Why do developers choose PostgreSQL?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con
    What companies use Citus?
    What companies use PostgreSQL?

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Citus?
    What tools integrate with PostgreSQL?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Citus and PostgreSQL?
    CockroachDB
    Cockroach Labs is the company building CockroachDB, an open source, survivable, strongly consistent, scale-out SQL database.
    TimescaleDB
    TimescaleDB: An open-source database built for analyzing time-series data with the power and convenience of SQL — on premise, at the edge, or in the cloud.
    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.
    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.
    Microsoft SQL Server
    Microsoft® SQL Server is a database management and analysis system for e-commerce, line-of-business, and data warehousing solutions.
    See all alternatives
    Decisions about Citus and PostgreSQL
    Dan Robinson
    Dan Robinson
    at Heap, Inc. · | 16 upvotes · 54.2K views
    atHeapHeap
    PostgreSQL
    PostgreSQL
    Citus
    Citus
    #DataStores
    #Databases

    PostgreSQL was an easy early decision for the founding team. The relational data model fit the types of analyses they would be doing: filtering, grouping, joining, etc., and it was the database they knew best.

    Shortly after adopting PG, they discovered Citus, which is a tool that makes it easy to distribute queries. Although it was a young project and a fork of Postgres at that point, Dan says the team was very available, highly expert, and it wouldn’t be very difficult to move back to PG if they needed to.

    The stuff they forked was in query execution. You could treat the worker nodes like regular PG instances. Citus also gave them a ton of flexibility to make queries fast, and again, they felt the data model was the best fit for their application.

    #DataStores #Databases

    See more
    Dan Robinson
    Dan Robinson
    at Heap, Inc. · | 14 upvotes · 50.8K views
    atHeapHeap
    Heap
    Heap
    Citus
    Citus
    PostgreSQL
    PostgreSQL
    Kafka
    Kafka
    Node.js
    Node.js
    #MessageQueue
    #Databases
    #FrameworksFullStack

    At Heap, we searched for an existing tool that would allow us to express the full range of analyses we needed, index the event definitions that made up the analyses, and was a mature, natively distributed system.

    After coming up empty on this search, we decided to compromise on the “maturity” requirement and build our own distributed system around Citus and sharded PostgreSQL. It was at this point that we also introduced Kafka as a queueing layer between the Node.js application servers and Postgres.

    If we could go back in time, we probably would have started using Kafka on day one. One of the biggest benefits in adopting Kafka has been the peace of mind that it brings. In an analytics infrastructure, it’s often possible to make data ingestion idempotent.

    In Heap’s case, that means that, if anything downstream from Kafka goes down, we won’t lose any data – it’s just going to take a bit longer to get to its destination. We also learned that you want the path between data hitting your servers and your initial persistence layer (in this case, Kafka) to be as short and simple as possible, since that is the surface area where a failure means you can lose customer data. We learned that it’s a very good fit for an analytics tool, since you can handle a huge number of incoming writes with relatively low latency. Kafka also gives you the ability to “replay” the data flow: it’s like a commit log for your whole infrastructure.

    #MessageQueue #Databases #FrameworksFullStack

    See more
    Anton Sidelnikov
    Anton Sidelnikov
    Backend Developer at Beamery · | 6 upvotes · 9.2K views
    PostgreSQL
    PostgreSQL
    MongoDB
    MongoDB

    In my opinion PostgreSQL is totally over MongoDB - not only works with structured data & SQL & strict types, but also has excellent support for unstructured data as separate data type (you can store arbitrary JSONs - and they may be also queryable, depending on one of format's you may choose). Both writes & reads are much faster, then in Mongo. So you can get best on Document NoSQL & SQL in single database..

    Formal downside of PostgreSQL is clustering scalability. There's not simple way to build distributed a cluster. However, two points:

    1) You will need much more time before you need to actually scale due to PG's efficiency. And if you follow database-per-service pattern, maybe you won't need ever, cause dealing few billion records on single machine is an option for PG.

    2) When you need to - you do it in a way you need, including as a part of app's logic (e.g. sharding by key, or PG-based clustering solution with strict model), scalability will be very transparent, much more obvious than Mongo's "cluster just works (but then fails)" replication.

    See more
    Joshua Dean Küpper
    Joshua Dean Küpper
    CEO at Scrayos UG (haftungsbeschränkt) · | 5 upvotes · 51.3K views
    atScrayos UG (haftungsbeschränkt)Scrayos UG (haftungsbeschränkt)
    MariaDB
    MariaDB
    PostgreSQL
    PostgreSQL
    GitLab
    GitLab
    Sentry
    Sentry

    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. PostgreSQLs 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
    Alex A
    Alex A
    Founder at PRIZ Guru · | 6 upvotes · 8.5K views
    atPRIZ GuruPRIZ Guru
    MySQL
    MySQL
    PostgreSQL
    PostgreSQL

    One of our battles at the very beginning of the road was choosing the right database. In fact, our first prototype was built on MySQL and back then nothing else was even under a consideration (don't ask me why). At some point, I was working on a project which was running on PostgreSQL and it is only then I understood the full power of it. We have over a billion of records in production instance, and we are able to optimize it to run fast and reliable. Well, now my default DB is PostgreSQL :)

    See more
    Tim Nolet
    Tim Nolet
    Founder, Engineer & Dishwasher at Checkly · | 8 upvotes · 64.4K views
    atChecklyHQChecklyHQ
    PostgreSQL
    PostgreSQL
    Heroku
    Heroku
    Node.js
    Node.js
    MongoDB
    MongoDB
    Amazon DynamoDB
    Amazon DynamoDB

    PostgreSQL Heroku Node.js MongoDB Amazon DynamoDB

    When I started building Checkly, one of the first things on the agenda was how to actually structure our SaaS database model: think accounts, users, subscriptions etc. Weirdly, there is not a lot of information on this on the "blogopshere" (cringe...). After research and some false starts with MongoDB and Amazon DynamoDB we ended up with PostgreSQL and a schema consisting of just four tables that form the backbone of all generic "Saasy" stuff almost any B2B SaaS bumps into.

    In a nutshell:cPostgreSQL Heroku Node.js MongoDB Amazon DynamoDB

    When I started building Checkly, one of the first things on the agenda was how to actually structure our SaaS database model: think accounts, users, subscriptions etc. Weirdly, there is not a lot of information on this on the "blogopshere" (cringe...). After research and some false starts with MongoDB and Amazon DynamoDB we ended up with PostgreSQL and a schema consisting of just four tables that form the backbone of all generic "Saasy" stuff almost any B2B SaaS bumps into.

    In a nutshell:

    • We use Postgres on Heroku.
    • We use a "one database, on schema" approach for partitioning customer data.
    • We use an accounts, memberships and users table to create a many-to-many relation between users and accounts.
    • We completely decouple prices, payments and the exact ingredients for a customer's plan.

    All the details including a database schema diagram are in the linked blog post.

    See more
    Łukasz Korecki
    Łukasz Korecki
    CTO & Co-founder at EnjoyHQ · | 12 upvotes · 48.1K views
    atEnjoyHQEnjoyHQ
    RethinkDB
    RethinkDB
    MongoDB
    MongoDB
    PostgreSQL
    PostgreSQL

    We initially chose RethinkDB because of the schema-less document store features, and better durability resilience/story than MongoDB In the end, it didn't work out quite as we expected: there's plenty of scalability issues, it's near impossible to run analytical workloads and small community makes working with Rethink a challenge. We're in process of migrating all our workloads to PostgreSQL and hopefully, we will be able to decommission our RethinkDB deployment soon.

    See more
    Mauro Bennici
    Mauro Bennici
    CTO at You Are My GUide · | 7 upvotes · 12.2K views
    atYou Are My GUideYou Are My GUide
    PostgreSQL
    PostgreSQL
    TimescaleDB
    TimescaleDB
    MongoDB
    MongoDB

    PostgreSQL plus TimescaleDB allow us to concentrate the business effort on how to analyze valuable data instead of manage them on IT side. We are now able to ingest thousand of social shares "managed" data without compromise the scalability of the system or the time query. TimescaleDB is transparent to