Chris van Eijk: CREATE POLICY IF NOT EXISTS in PostgreSQL: what works

PostgreSQL has no CREATE POLICY IF NOT EXISTS. Three ways to write a repeatable policy migration, measured on PostgreSQL 17 and 18: gaps, locks and races.

cloud

Sources