I wrote:
> 2. As the ANALYZE proceeds, it issues sinval messages due to the updates
> it's making in pg_statistic. This is normal.
Small correction: actually, backends only send sinval messages at
commit, so the ANALYZE will just be accumulating pending messages in its
private memory. Your observed symptom therefore can only occur if other
transactions running parallel to the ANALYZE perform sufficient catalog
updating activity to fill the sinval message queue. And there must also
be at least one long-term-idle backend, so that the queue doesn't get
drained.
I had been wondering why we'd not identified this problem before, but
that combination of factors is probably unusual enough to explain why
not.
regards, tom lane