Boy is this a stupid behavior of Postgres, and one that only really manifests when restoring data from a backup.