Tech world is smaller than one imagines. I have countless examples.
Recent Articles
pglite
I kept hearing about the term wire protocol especially Postgres wire protocol in the recent days (Looking at you cockroachdb, yugabytedb - in a good way) but never really quite understood it. Decided to implement something simple in Go to understand it better. As always, if you find anything wrong or I misunderstood please correct me.
In simple terms,
“wire” - something over network generally (but PG also supports over domain sockets)
read more
Citus Data - How it enables distributed postgres
Citus: Distributed PostgreSQL for Data-Intensive Applications paper can be downloaded here.
Recently, our team got a request to provide a solution to shard Postgres. One of the solutions that we discussed was Citus. I have heard about the product and seen their blogs related to Postgres in the past but never used it. I thought it would be fun to read about its internal workings.
If you find something wrong on the notes, please send a pull request.
read more
How I found my mentor
TL;DR:
Connect with people whom you admire. Things can take longer so stay in touch. At the right moment, don’t hesitate to ask.
I recently became an Engineering Manager after being an Individual Contributor for almost 8 years. If you are interested to know more about the reasoning behind the change. As like many other jobs in Tech, there is no formal training for an Engineering Manager. Reminds me of my dad’s saying “How do you teach one to swim?
read more
Postgres schema migration gotchas
Capturing thoughts from https://twitter.com/viggy28/status/1530800893842444289
When you are doing major DML changes, other than locks one more thing to keep in mind is replication lag. Especially if you use your replicas in hot standby mode.
When you need to delete most of the records in a massive table, its better to create a new table and just copy the records that you need to preserve. When you need to delete all the records in a massive table, just truncate it instead of deleting them.
read more
Postgres logging
Before I forget let me write this down here. $$ log_stament - none - all
log_min_duration_statment - millisecond value
When you set log_statement=none and log_min_duration_statement=1 then any statement which takes longer than 1 millisecond will be logged.
When you set log_statement=all and log_min_duration_statement=1 then all statements are logged; however it only shows duration on statements longer than 1 millisecond.
read more