recentpopularlog in

colin.jack : postgresql   17

Bye Bye Mongo, Hello Postgres | Hacker News
excellent write up of a migration from mongodb to postgres.
guardian  mongodb  PostgreSQL  Migrations 
6 weeks ago by colin.jack
When an SQL Database Makes a Great Pub/Sub | Hacker News
Databases such as postgresql will effectively issue a buffer of keys to each connection, meaning in some circumstances the sequences will not be monotonic with respect to time. Also that usually long running transactions will use the timestamp the transaction was opened, regardless of how many seconds have passed between then and when the statement is executed.
PostgreSQL  SQL  Databases 
december 2019 by colin.jack
Why Uber Engineering Switched from Postgres to MySQL - Uber Engineering Blog

"This design means that InnoDB is at a slight disadvantage to Postgres when doing a secondary key lookup, since two indexes must be searched with InnoDB compared to just one for Postgres. However, because the data is normalized, row updates only need to update index records that are actually changed by the row update. Additionally, InnoDB typically does row updates in place. If old transactions need to reference a row for the purposes of MVCC MySQL copies the old row into a special area called the rollback segment."
PostgreSQL  MySQL  MVCC  Databases  Uber 
august 2016 by colin.jack
It's really not documented well (and the generated docs are a joke) but from wha... | Hacker News
It's really not documented well (and the generated docs are a joke) but from what I can gather, it's bog-standard PG replication with a go app to monitor the replication and do automated failover.
The monitor node appears to be there to act as neutral witness node so that a secondary is only promoted leader if it can reach the monitor and the monitor cannot reach the current leader. Hopefully, the leader also commits suicide when it cannot reach the monitor.
MS SQL server implements this pattern and calls it "Database Mirroring Witness":
DistributedSystems  PostgreSQL  clustering 
november 2015 by colin.jack
Postgres high-availability cluster with auto-failover and cluster recovery | Hacker News
Thats true, however in yokes case, each cluster needs a third member called a monitor who only serves to resolve network partitions. a secondary cannot self promote to primary without the monitor agreeing.
two node systems can never work as a primary/secondary failover solution in the presence of a network partition.
disclosure: I helped write yoke.
PostgreSQL  Consistency  DistributedSystems 
november 2015 by colin.jack
nanopack/yoke - PostegreSQL Cluster

Yoke is a Postgres redundancy/auto-failover solution that provides a high-availability PostgreSQL cluster that's simple to manage.
PostgreSQL  DistributedSystems  Consistency 
november 2015 by colin.jack
The Ideal Domain-Driven Design Aggregate Store?
When thinking of a JSON-based store, no doubt your mind is immediately drawn to MongoDB. That’s just how MongoDB works. While true, MongoDB still falls short of filling the needs of DDD Aggregates in one very important way. In our park bench discussion I noted how MongoDB was close to what I wanted, but that you could not use MongoDB to both update an Aggregate’s state to one collection in the store and append one or more new Domain Events to a different collection in the same operation. In short, MongoDB doesn’t support ACID transactions. This is a big problem when you want to use Domain Events along with your Aggregates, but you don’t want to use Event Sourcing. That is, your Domain Events are an adjunct to your Aggregate state, not its left fold. Hopefully I don’t have to explain the problems that would occur if we successfully saved an Aggregate’s state to MongoDB, but failed to append a new Domain Event to the same storage. That would simply make the state of the application completely wrong, and no doubt would lead to inconsistencies in dependent parts of our own Domain Model and/or those in one or more other Bounded Contexts.
MongoDB  DDD  Aggregates  PostgreSQL 
july 2015 by colin.jack
If Eventual Consistency Seems Hard, Wait Till You Try MVCC | Hacker News
PostgreSQL supports true serializability, while maintaining good performance and concurrency:
It's based on fairly recent research by Michael J. Cahill, et al.
It's simple. If you are confused, then set default_transaction_isolation=true. You will get errors if there's a data race.
Given that, what's the point of the article? That sub-SERIALIZABLE modes have complex semantics? Yes, that's true, but they are still much more likely to help you then the NoSQL "you're on your own to avoid races" approach.
If you want to avoid lots of really challenging problems, PostgreSQL is often the best bet by far.
PostgreSQL  RelationalDB  ACID 
december 2014 by colin.jack

Copy this bookmark:

to read