#postgres
1 note
- Jun 28, 2026
PostgreSQL
UNLOGGEDtables skip the write-ahead log, making writes considerably faster than ordinary tables. Trade-off: they are truncated after a crash or unclean shutdown and are not replicated to standbys. hynek/psycache exploits this as a PostgreSQL-native cache replacing Redis — crash truncation is acceptable since it's a cache anyway, and you reuse existing Postgres connections. Interesting idea: port this to Django as a customBaseCachebackend — swapDatabaseCache's regular table forCREATE UNLOGGED TABLE, reuse Django's existing DB connections, and skip Redis entirely. ~200 lines.