PROGRAMMING
SQL
Practical tutorials for the work we actually do. Pick one, read it in order, and apply it.
0 likes
Likes for this tutorial.
Create an Index Without Blocking Writes
Level: Advanced
Build an index with CREATE INDEX CONCURRENTLY while a writer is active, and handle the transaction-block error and the invalid index that a failed build leaves. After this, you can add an index to a busy table without stopping its writers.
4 min read
0 likes
Likes for this tutorial.
Add a NOT NULL Column to a Big Table Without Downtime
Level: Advanced
Add a NOT NULL column to a big table with a constant default, or with a nullable column, a batch backfill, NOT VALID and VALIDATE. After this, you can tell a quick change from a table rewrite and avoid long locks.
5 min read
0 likes
Likes for this tutorial.
Back Up With pg_dump and Prove the Restore Works
Level: Advanced
Take a pg_dump backup in Docker, restore it into a scratch database, compare the tables and see what a damaged backup looks like. After this, you have a short routine that proves your backup works.
5 min read