Detect custom format archives before scanning for blocked commands and tighten PostgreSQL restore command matching.