pg_test_fsync: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/lib/postgresql/9.4/bin/pg_test_fsync - from package: postgresql-contrib-9.4

You may install the required package with command apt-get install {package}
Error in other languages:
pg_test_fsync: bevel nie gevind nie
pg_test_fsync: comandă negăsită
pg_test_fsync: comando não encontrado
pg_test_fsync: commande introuvable
pg_test_fsync: command not found
pg_test_fsync: käsku ei ole
pg_test_fsync: không tìm thấy lệnh
pg_test_fsync: komanda nerasta
pg_test_fsync: Kommando nicht gefunden.
pg_test_fsync: kommandot finns inte
pg_test_fsync: komut yok
pg_test_fsync: nie znaleziono polecenia
pg_test_fsync: níor aimsíodh an t-ordú
pg_test_fsync: no se encontró la orden
pg_test_fsync: no s'ha trobat l'ordre
pg_test_fsync: opdracht niet gevonden
pg_test_fsync: parancs nem található
pg_test_fsync: perintah tidak ditemukan
pg_test_fsync: príkaz nenájdený
pg_test_fsync: příkaz nenalezen
pg_test_fsync: команда не найдена
pg_test_fsync: командата не е открита
pg_test_fsync: 命令找不到
pg_test_fsync: コマンドが見つかりません