A Time-of-check Time-of-use (TOCTOU) race condition in pg dump in PostgreSQL allows an object creator to execute arbitrary SQL functions as the user running pg dump, which is often a superuser. The attack involves replacing another relation type with a view or foreign table. The attack requires waiting for pg dump to start, but winning the race condition is trivial if the attacker retains an open transaction. Approximately 3,929,844 devices are potentially affected, mainly distributed in the United States, Germany, and other countries.