I had installed PostgreSQL but when I do run command postgres in windows CMD
It gives following error:
postgres does not know where to find the server configuration file.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.
Even after running command
initdb postgresas maintained similar Issuepostgres -D C:\Program Files\PostgreSQL\data\gave me following output:
2016-09-28 15:04:57 PDT LOG: could not bind IPv6 socket: Only one usage of each socket address (protocol/network address/port) is normally permitted.
2016-09-28 15:04:57 PDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2016-09-28 15:04:57 PDT LOG: could not bind IPv4 socket: Only one usage of each socket address (protocol/network address/port) is normally permitted.
2016-09-28 15:04:57 PDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2016-09-28 15:04:57 PDT WARNING: could not create listen socket for "*"
2016-09-28 15:04:57 PDT FATAL: could not create any TCP/IP sockets
2016-09-28 15:04:57 PDT LOG: database system is shut down
pg_ctlto start the Postgres server. Do not usepostgresfor that.postgres.exemanually? What happens if you usepsqlto connect to Postgres?