1

I'm having trouble starting a postgres database. I'm running 9.2 on Centos 5.4 (for compatibility reasons). Here is what I have done so far:

  • Ran postgres initdb for the directory /opt/database
  • Updated postgresql.conf to increase sessions, use more of the available ram, and change logging.
  • Started postgres as a test (it worked)
  • Added a recovery.conf and changed pg_hba.conf to allow replication (this is a slave)
  • Ran a pg_basebackup (as user postgres) to get a copy of data from the master

After the completion of the basebackup, I tried to start postgres and it fails with no error output. The only information I have is from the pgstartup.log which says:

runuser: cannot set groups: Operation not permitted

The runuser command has 2755 permissions (setgid sticky bit set). Because of something I found in another forum, I ran /usr/pgsql-9.2/bin/postgres -d 3 -D /opt/database -c config_file=/opt/database/postgresql.conf as user postgres. I received the following output (which has been trimmed to remove useless bits like my ls colors, and my ssh session information).

DEBUG:  postgres: PostmasterMain: initial environment dump:
DEBUG:  -----------------------------------------
DEBUG:      USER=postgres
DEBUG:      LD_LIBRARY_PATH=/usr/pgsql-9.2/lib
DEBUG:      PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
DEBUG:      _=/usr/pgsql-9.2/bin/postgres
DEBUG:      PWD=/opt/database
DEBUG:      INPUTRC=/etc/inputrc
DEBUG:      EDITOR=vim
DEBUG:      SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
DEBUG:      HOME=/var/lib/pgsql
DEBUG:      SHLVL=2
DEBUG:      LOGNAME=postgres
DEBUG:      CVS_RSH=ssh
DEBUG:      LESSOPEN=|/usr/bin/lesspipe.sh %s
DEBUG:      G_BROKEN_FILENAMES=1
DEBUG:      HISTTIMEFORMAT=%F %T:
DEBUG:      PGLOCALEDIR=/usr/pgsql-9.2/share/locale
DEBUG:      PGSYSCONFDIR=/etc/sysconfig/pgsql
DEBUG:      LC_COLLATE=en_US.UTF-8
DEBUG:      LC_CTYPE=en_US.UTF-8
DEBUG:      LC_MESSAGES=en_US.utf8
DEBUG:  -----------------------------------------
DEBUG:  invoking IpcMemoryCreate(size=2220941312)
DEBUG:  SlruScanDirectory invoking callback on pg_notify/0000
DEBUG:  removing file "pg_notify/0000"
DEBUG:  max_safe_fds = 984, usable_fds = 1000, already_open = 6
bash-3.2$ DEBUG:  logger shutting down
DEBUG:  shmem_exit(0): 0 callbacks to make
DEBUG:  proc_exit(0): 0 callbacks to make
DEBUG:  exit(0)
DEBUG:  shmem_exit(-1): 0 callbacks to make
DEBUG:  proc_exit(-1): 0 callbacks to make

Any idea why postgres isn't starting?

4
  • runuser? What platform are you on? Jul 8, 2014 at 14:24
  • Excuse me for not including that. This is Centos 5.4. Jul 8, 2014 at 14:27
  • Do you have SELinux enabled on your CentOS installation?
    – Kassandry
    Sep 30, 2015 at 19:44
  • @Kassandry Unfortunately, I posted this over a year ago and have long since forgotten what the issue was or how I worked around it. :\ Sep 30, 2015 at 19:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.