Today I Learned

Quick notes and discoveries from daily learning. Short, focused, and useful.

Learning Timeline

PostgreSQL SKIP LOCKED

TIL about a specific clause introduced in PostgreSQL 9.5: SKIP LOCKED

It extends the SQL FOR UPDATE clause. While FOR UPDATE creates an exclusive row lock, adding SKIP LOCKED instructs the query to simply skip over any rows that are currently locked by another transaction, rather than waiting for them to be released.

This is the key mechanism that makes database-backed job queues viable at scale.

SolidQueue uses this to act as a robust alternative to Redis. By running SELECT ... FOR UPDATE SKIP LOCKED, multiple workers can query the table simultaneously and claim unique jobs without running into lock contention or blocking one another.

Source: https://www.simplethread.com/redis-solidqueue/

WYSIWYG

TIL an acronym: WYSIWYG

It stands for What You See Is What You Get, as in manipulating the visual results directly. Underlying representations are abstracted from the user.

I love Notion as a user. In order to explain what it does as a philosophy unlike Markdown or LaTeX (they are WYSIWYM - What You See Is What You Mean btw), I would have to use lots of words to explain.

But turns out, all I needed was an acronym :D

keywordacronymeditormarkdown

2 learnings and counting