sudo apt update
...
Get:10 http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease [81.6 kB]
Err:10 http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXX
Reading package lists... Done
W: GPG error: http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXX
E: The repository 'http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.