Where is the Postgresql config file: 'postgresql.conf' on Windows?

后端 未结 3 503
野性不改
野性不改 2020-12-08 13:17

I\'m receiving this message but I can\'t find the postgresql.conf file:

OperationalError: could not connect to server: Connection refused (0x0000         


        
相关标签:
3条回答
  • 2020-12-08 13:43

    On my machine:

    C:\Program Files\PostgreSQL\8.4\data\postgresql.conf
    
    0 讨论(0)
  • 2020-12-08 13:44

    postgresql.conf is located in PostgreSQL's data directory. The data directory is configured during the setup and the setting is saved as PGDATA entry in c:\Program Files\PostgreSQL\<version>\pg_env.bat, for example

    @ECHO OFF
    REM The script sets environment variables helpful for PostgreSQL
    
    @SET PATH="C:\Program Files\PostgreSQL\<version>\bin";%PATH%
    @SET PGDATA=D:\PostgreSQL\<version>\data
    @SET PGDATABASE=postgres
    @SET PGUSER=postgres
    @SET PGPORT=5432
    @SET PGLOCALEDIR=C:\Program Files\PostgreSQL\<version>\share\locale
    

    Alternatively you can query your database with SHOW config_file; if you are a superuser.

    0 讨论(0)
  • 2020-12-08 13:52

    On my machine:

    C:\Program Files (x86)\OpenERP 6.1-20121026-233219\PostgreSQL\data
    
    0 讨论(0)
提交回复
热议问题