I did setup streaming replication on the Ubuntu 12.04 LTS with rsyncing of the WAL files in case of failure. Now I was trying to do the same on the CentOS 6.5.
To do this I've added official RPM from postgresql.org and installed postgresql 9.1 using yum.
Everything is fine till the step where I should create the recovery.conf
file.
It is enough just to create even empty recovery.conf
file in the $PDATA
directory so PostgreSQL won't start:
DEBUG: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
DEBUG: MAIL=/var/spool/mail/root
DEBUG: LC_IDENTIFICATION=pl_PL.UTF-8
DEBUG: PWD=/var/lib/pgsql
DEBUG: LANG=en_US.UTF-8
DEBUG: LC_MEASUREMENT=pl_PL.UTF-8
DEBUG: SELINUX_LEVEL_REQUESTED=
DEBUG: HISTCONTROL=ignoredups
DEBUG: HOME=/var/lib/pgsql
DEBUG: SHLVL=2
DEBUG: LOGNAME=postgres
DEBUG: SSH_CONNECTION=10.255.0.142 41803 10.255.0.186 22
DEBUG: LESSOPEN=|/usr/bin/lesspipe.sh %s
DEBUG: LC_TIME=C
DEBUG: G_BROKEN_FILENAMES=1
DEBUG: LC_NAME=pl_PL.UTF-8
DEBUG: _=/usr/pgsql-9.1/bin/postgres
DEBUG: PGLOCALEDIR=/usr/pgsql-9.1/share/locale
DEBUG: PGSYSCONFDIR=/etc/sysconfig/pgsql
DEBUG: LC_COLLATE=en_US.UTF-8
DEBUG: LC_CTYPE=en_US.UTF-8
DEBUG: LC_MESSAGES=pl_PL.UTF-8
DEBUG: -----------------------------------------
DEBUG: invoking IpcMemoryCreate(size=39288832)
DEBUG: usuwanie pliku "pg_notify/0000" # removing file
DEBUG: max_safe_fds = 984, usable_fds = 1000, already_open = 6
DEBUG: zatrzymanie rejestratora # means stop registry/registrator
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
The same when running gdb:
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
Program exited with code 01.
(gdb) bt
No stack.
with -d 5
and LC=C
(too long to fit into post)
http://pastebin.com/Z7t1CEwg
Without that recovery.conf file PostgreSQL is running normally.
Has anyone faced such issue?