Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Actually, from the translation file: ` #: postmaster/syslogger.c:517 #, c-format msgid "logger shutting down" msgstr "zatrzymanie rejestratora"` . So the message is logger shutting down. The real cause of the shutdown is much earlier in the logs. Run with a lower debug setting, or just look further back. Consider running the server with LANG=C LC_ALL=C as well, so you get English messages to paste here. –  Craig Ringer Mar 20 at 0:58
    
@CraigRinger thank you for suggestion. I've uploaded full debug info to pastebin: pastebin.com/Z7t1CEwg - seems like LC=C LANG=C LC_MESSAGES=C doesn't do anything :/ –  mickula Mar 20 at 9:08
    
Weird. And if you create a non-empty, valid recovery.conf do you see the same outcome? –  Craig Ringer Mar 20 at 9:26
    
Yup, even when I copy the recovery.conf from the Ubuntu where streaming replication works it's the same. I've been also messing with file permissions but looking at the source of postgres it's not the issue I believe. –  mickula Mar 20 at 9:34
    
That's bizarre. I'd expect to see something in the logs. What's the exact command you use to start the server? –  Craig Ringer Mar 20 at 9:49

1 Answer 1

up vote 0 down vote accepted

The problem does not happen on CentOS x64. This is just temporal workaround but I'm accepting it not having better answer.

share|improve this answer
    
You mean you were not using 64 bit distro so far? 32 bit os aren't recommended nowadays except for embedded systems –  coincoin Apr 2 at 6:10
    
well those were virtualized CentOSes on the Ubuntu 12.04 LTS 32 bit running on the CPU without virtualization support so I couldn't do it another way. What still does not explain why official yum repo from postgres contains x32 database distribution bugged or how-you-call-it in such weird way. –  mickula Apr 2 at 12:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.