pacman ships with a utility _specifically_ for this use case: `checkupdates`:
> checkupdates --help
> checkupdates (pacman) v5.0.2
>
> Safely print a list of pending updates
This ensures that you are not misguidedly running `Pacman -Sy` to update your local database without simulataneously upgrading any out-of-date packages, thereby (inadvertently) running an unsupported partial upgrade.
To print the results of `checkupdates` to your terminal or statusbar/conky/whatever, you just query the temporary database:
pacman -Qqu --dbpath /tmp/checkup-db-user/
You can then set up a systemd-timer or cron job to refresh this database without worrying that you will break your system.
pacman ships with a variety of helpful utilities, you can see them all with:
pacman -Ql pacman | awk -F/ '/bin/ {print $4}'