source

Windows의 Postgresql 구성 파일 'postgresql.conf'는 어디에 있습니까?

itover 2023. 4. 12. 22:17
반응형

Windows의 Postgresql 구성 파일 'postgresql.conf'는 어디에 있습니까?

이 메시지를 수신하고 있습니다만, 이 메시지를 찾을 수 없습니다.postgresql.conf파일:

OperationalError: could not connect to server: Connection refused (0x0000274D/10061)
    Is the server running on host "???" and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
    Is the server running on host "???" and accepting
    TCP/IP connections on port 5432?

내 컴퓨터:

C:\Program Files\PostgreSQL\8.4\data\postgresql.conf

postgresql.confPostgre에 있습니다.SQL의 데이터 디렉토리.데이터 디렉토리는 셋업 중에 설정되며 설정은 다음과 같이 저장됩니다.PGDATA에의 기입c:\Program Files\PostgreSQL\<version>\pg_env.bat,예를들면

@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

또는 다음을 사용하여 데이터베이스를 쿼리할 수 있습니다.SHOW config_file;슈퍼 유저라면.

이 경로를 따라가면 찾을 수 있습니다.

C:\Program Files\PostgreSQL\13\data

내 컴퓨터:

C:\Program Files (x86)\OpenERP 6.1-20121026-233219\PostgreSQL\data

postgressql.conf 파일이 표시됩니다.

C:/programfiles/postgressql/14/data 사용자 이름 비밀번호 확인도 pg_hba에서 받습니다.

PGDATA는 Postgresql에서 ConfigDir로 간주되며, 이는 도커 및 일반 설치에서도 작동합니다.이것은 명시적으로 변경되지 않는 한 기본 설정입니다.

도킹 스테이션 PGDA로TA는 "/var/lib/postgresql/data"로 설정되므로 모든 설정은 이 디렉토리에서 찾을 수 있습니다.

#------------------------------------------------------------------------------
# FILE LOCATIONS
#------------------------------------------------------------------------------

# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.

#data_directory = 'ConfigDir'       # use data in another directory
                # (change requires restart)
#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file
                # (change requires restart)
#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
                # (change requires restart)

# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = ''         # write an extra PID file
                # (change requires restart)

언급URL : https://stackoverflow.com/questions/4465475/where-is-the-postgresql-config-file-postgresql-conf-on-windows

반응형