Skip to content

Instantly share code, notes, and snippets.

@k-bx
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k-bx/799855d18ef4910dc0b8 to your computer and use it in GitHub Desktop.
Save k-bx/799855d18ef4910dc0b8 to your computer and use it in GitHub Desktop.
Poll: People who prefer PostgreSQL to MongoDB, how do you use it?

Poll: People who prefer PostgreSQL to MongoDB, how do you use it?

In the light of recent article about how bad MongoDB is, I wanted to finally collect answers from people who support that author and also use PostgreSQL instead of MongoDB. There seem to be many different options for "big data" problems, so I thought it might be interesting to ask few questions:

  1. How do you replicate your data?
  2. How do you shard your data?
  3. How do you do failover?
  4. How much of a downtime do you have on schema-migrations?
  5. How hard would you say it is to maintain such a setup?

There doesn't seem to be a lot of information on experience on these in the internet, maybe we should talk more about those?

Thank you.

@savingschampion
Copy link

  1. Replication via Async Streaming Replication, with Wal-e acting as backup system in event that replicas lose connection to server directly.
  2. I haven't needed to yet.
  3. I've automated our failover via Puppet, however there is a period of undefined behaviours currently during failover that we're working to improve upon.
  4. Typically zero downtime due to migrations, depending upon the migration.
  5. Bringing up a postgresql server in the first place is where I can see the majority of issues arrising, as once it's up, you just leave it alone

@le0pard
Copy link

le0pard commented Jul 20, 2015

  1. Build-in replication (async and sync), Bi-Directional Replication (BDR), Londiste, Bucardo
  2. Pl/Proxy, pg_shard, Postgres-XC
  3. pgpool-|| http://www.pgpool.net/pgpool-web/contrib_docs/watchdog_master_slave/en.html (which also used to balance "Select" queries between slave databases)
  4. Zero. To add field not block table, untill you not add "DEFAULT" value to it. But this can solved by created table with need schema and migrate data from old one (+ trigger for data which came until you migrate). Indexes also can be create concurrent without blocking (build in functionality).
  5. I using Chef/Puppet/Ansible as configuration managment system, so in most cases simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment