Configuration

PostgreSQL 配置被忽略

  • April 28, 2016

我有一個自定義 postgresql 建構,它顯示以下輸出pg_config

BINDIR = /var/buildout.webstacks.xwiki/bin
DOCDIR = /var/buildout.webstacks.xwiki/share/doc/postgresql
HTMLDIR = /var/buildout.webstacks.xwiki/share/doc/postgresql
INCLUDEDIR = /var/buildout.webstacks.xwiki/include
PKGINCLUDEDIR = /var/buildout.webstacks.xwiki/include/postgresql
INCLUDEDIR-SERVER = /var/buildout.webstacks.xwiki/include/postgresql/server
LIBDIR = /var/buildout.webstacks.xwiki/lib
PKGLIBDIR = /var/buildout.webstacks.xwiki/lib/postgresql
LOCALDIR = /var/buildout.webstacks.xwiki/share/locale
MANDIR = /var/buildout.webstacks.xwiki/share/man
SHAREDIR = /var/buildout.webstacks.xwiki/share/postgresql
SYSCONFDIR = /var/buildout.webstacks.xwiki/etc/postgresql
PGXS = /var/buildout.webstacks.xwiki/lib/postgresql/pgxs/src/makefiles/pgxs.mk
配置 = '--prefix=/var/buildout.webstacks.xwiki' '--sysconfdir=/var/buildout.webstacks.xwiki/etc'
CC = gcc
CPPFLAGS = -D_GNU_SOURCE
CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL = -fpic
LDFLAGS = -Wl,--根據需要 -Wl,-rpath,'/var/buildout.webstacks.xwiki/lib'
LDFLAGS_SL =
LIBS = -lpgport -lz -lreadline -lcrypt -ldl -lm
版本 = PostgreSQL 8.4.9

配置文件應該在/var/buildout.webstacks.xwiki/etc/postgresql.

但是當我在該路徑中添加或編輯配置文件時,它們會被忽略。相反,postgres 使用數據目錄中的文件,在initdb.

./configure根據我的命令,如何讓 postgres 使用我的配置(另外) 。

似乎只有一種方法可以移出 postgresql.conf“數據目錄”。在伺服器啟動期間。

從文件:

config_file (string) 指定主伺服器配置文件(通常稱為 postgresql.conf)。此參數只能在 postgres 命令行上設置

內部postgresql.conf指令為:

hba_file='/var/buildout.webstacks.davical/etc/postgresql/pg_hba.conf'       
ident_file = '/var/buildout.webstacks.davical/etc/postgresql/pg_ident'

可以用來指pg_hba.confpg_ident.conf

另請參閱:PostgreSQL 文件

引用自:https://serverfault.com/questions/772893