Pacman Installs Fail with 404

Recently I did a pacman -S install, and it failed. It failed for multiple, well-known packages. It should have worked.

Output

The output that I got back from pacman included these kinds of errors:

➜ sudo pacman -S postgresql
...
error: failed retrieving file 'postgresql-14.3-3-x86_64.pkg.tar.zst' from mirror.lty.me : The requested URL returned error: 404
error: failed retrieving file 'postgresql-14.3-3-x86_64.pkg.tar.zst' from mirror.osbeck.com : The requested URL returned error: 404
error: failed retrieving file 'postgresql-14.3-3-x86_64.pkg.tar.zst' from arch.mirror.square-r00t.net : Failed to connect to arch.mirror.square-r00t.net port 443 after 5295 ms: Connection timed out
error: failed retrieving file 'postgresql-14.3-3-x86_64.pkg.tar.zst' from asia.mirror.pkgbuild.com : The requested URL returned error: 404
...

Surely there's no way that a well-known package like postgresql would be lost from all these mirrors.

Update the system

The problem was, however, that my own database of package mirrors was out of date. It had been a while.

I ran a system update with the install step:

sudo pacman -Syu postgresl

This updated the package mirrors, and the install worked just fine.

It seems like a big hammer for the problem. Does anyone know of a less-monumental option?