For Windows, inside below file, search for port
port
C:\Program Files\PostgreSQL\[version]\data\postgresql.conf
or if you are already have access to DB, try below command in POSTGRES:
SHOW config_file;