Advanced
- Transaction Wraparound Problem
- Transaction ID Freezing
- Integration of Freezing Logic in VACUUM
- Aggressive Freezing vs. Lazy Freezing
- Multi-page Freezing and Freeze Map Maintenance
Low level working - https://erthalion.info/2019/12/06/postgresql-stay-curious
Locking Tuples internals - https://github.com/postgres/postgres/blob/master/src/backend/access/heap/README.tuplock
Youtube - Breaking PostgreSQL at Scale - Christophe Pettus
Transaction Wraparound Problem
- What is Transaction Wraparound in PostgreSQL ?
- Prevent transaction ID wraparound | Cloud SQL for PostgreSQL | Google Cloud
- Prevent transaction ID wraparound by using postgres_get_av_diag() for monitoring autovacuum | AWS Database Blog
- How to simulate the deadly, infamous, misunderstood & complex ‘Transaction Wraparound Problem’ in PostgreSQL … « Tales From A Lazy Fat DBA
Tools
Row Security Policies
CREATE TABLE accounts (manager text, company text, contact_email text);
ALTER TABLE accounts ENABLE ROW LEVEL SECURITY;
CREATE POLICY account_managers ON accounts TO managers
USING (manager = current_user);