Tutorials
Practical tutorials for the work we actually do. Pick one, read it in order, and apply it.
Reproduce a deadlock between two money transfers, read the message, and fix it by locking rows in the same order. After this, you can turn a deadlock detected error into a plain wait.
Let two workers take different jobs from one table with FOR UPDATE SKIP LOCKED, and see what happens to a job when a worker fails. After this, you can use a plain table as a safe queue.
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.
Walk down an employee tree, walk up to the top, count each manager's team and guard the query against a loop with CYCLE. After this, you can query a parent-child table of any depth.
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.
Write a compose.yaml for a web server and a checker, start both, read the result and remove them. After this, you can run a two-service project from one file.
Copy a file or folder between a container and your computer, even from a stopped container. After this, you can rescue a file before you delete the container.
Check virtualization, WSL, the docker-desktop distribution, the engine context and memory in the order that finds the cause fastest. After this, you can get a stuck Docker Desktop running without resetting it.
Check CLI resolution, the intended local context and engine connection, then run and verify cleanup of a disposable test container.
Share a folder from your computer with a container, make it read-only and see how a mount can hide files that were already there. After this, you can mount a folder and know what it will and will not keep.
Open a shell with docker exec, run one command without it and read the two errors you will meet first. After this, you can look around inside a container and know why it sometimes refuses.
Find a stopped container, read its exit code and log, and tell a crash from a kill. After this, you can see why a container stopped in under a minute.