PrismaClientKnownRequestError code P1017 ("Server has closed the
connection.") is raised when the server closes an idle pooled client
before the next query runs (idle timeout, restart, pg_terminate_backend,
network blip). The @prisma/adapter-pg pool hands out a fresh client on
the following attempt, so the failure is transient — but it surfaced
from personForIdentity -> linkSquadPerson -> syncEventSquadsNow and
rejected up to the archive caller, whose .catch() logged it at warn and
paged the error loop (errors.bitreport.pt, ERRSIG 42f1a9a09199).
Add isPrismaConnectionClosed() and retryOnConnectionClosed() to lib/pg
(matching the existing isPostgresAdminShutdown() family for 57P01), and
wrap the syncEventSquadsNow call in syncEventSquads with a single retry.
The operation is idempotent under a re-run (upserts, findUnique lookups,
unique-constraint creates whose P2002 is already caught), so replaying
it on a fresh connection is safe. Distinct from 57P01, which is handled
in the worker poll loops (BIT-32448/32449/32450) and the pg.Pool error
listener (BIT-32447).
Paperclip-Issue: BIT-32460
Paperclip-Cluster: 21cd13c42286