When 2 gunicorn workers start simultaneously, both call create_all() which races on CREATE TABLE attachments. The second worker hits a PostgreSQL UniqueViolation on pg_type_typname_nsp_index because the type already exists. Wrap create_tables() in try/except to handle this gracefully. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>