Couple things to verify:
1. Check if you can actually access your data using ODBC connector you have created (using other ODBC-enabled applications, for example).
2. Check if you have the latest and greatest Postgres ODBC driver with proper 64-bit support installed on your Qlik Server.
I've had the same case some time ago and resolving #2 was a key.
In fact, This is my first time connection to DB I am not getting any issue while connect to Postgres
LIB CONNECT TO 'PostgreSQL30';
SQL SELECT "last_name",
1) Create New Connection
3) Follow the image, Please
4) Then Use Username - postgres and Password - XXXXXX is up on you
Then simple Click Okay and then Try to pull data from DB.
You can follow below Link to download as per your need