0

I have a custom postgresql build, that shows the following output on 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
LOCALEDIR = /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
CONFIGURE = '--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,--as-needed -Wl,-rpath,'/var/buildout.webstacks.xwiki/lib'
LDFLAGS_SL = 
LIBS = -lpgport -lz -lreadline -lcrypt -ldl -lm 
VERSION = PostgreSQL 8.4.9

The config files should be in /var/buildout.webstacks.xwiki/etc/postgresql.

But when I add or edit config files in that path, they get ignored. Instead postgres uses files in the data-directory, created during initdb.

How can I make postgres use my configs (in addition), according to my ./configure command.

moestly
  • 1,138
  • 8
  • 10
  • Have never done that, but check permissions. Log in with user `postgres` from root and try to read files from there. – sysfiend Apr 27 '16 at 07:48

1 Answers1

0

There seems to be only one way to move postgresql.conf out of the `data-directory. During server startup.

From the docs:

config_file (string) Specifies the main server configuration file (customarily called postgresql.conf). This parameter can only be set on the postgres command line.

Inside postgresql.conf directives as:

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

can be used to refer to pg_hba.conf and pg_ident.conf.

See also: PostgreSQL documentation

moestly
  • 1,138
  • 8
  • 10