Re: Centos Hot-Standby, different Startup behavior betweensystemctl & pg_ctl start. - Mailing list pgsql-novice

From
Subject Re: Centos Hot-Standby, different Startup behavior betweensystemctl & pg_ctl start.
Date
Msg-id 20160107083202.02ba4c4c55b8355eb9c1d44e33aacdec.aa528410fa.wbe@email15.secureserver.net
Whole thread Raw
List pgsql-novice
Hello Michael & list,

I could not get this working via any manipulation of permissions on the WALarchive or it's parents. But the sytemctl start up did work properly after I turned off SeLinux. That will be my solution in the short term, I guess. There do seem to be selinux policies specifically for Postgresql, maybe I can modify them in the future.

Yours,

Kurt


-------- Original Message --------
Subject: Re: [NOVICE] Centos Hot-Standby, different Startup behavior
between systemctl & pg_ctl start.
From: <kurt@thepw.com>
Date: Mon, January 04, 2016 8:48 am
To: "Michael Wood" <esiotrot@gmail.com>
Cc: "PostgreSQL List - Novice" <pgsql-novice@postgresql.org>

Hello Michael,
     Thanks for your reply! The contents of /var/backup/WALarchive will of course vary, but at the moment I see:

[root@databaseServer5 ~]# ls -ld /var/backup
drwxr-xr-x. 3 root root 4096 Dec 24 10:16 /var/backup
[root@databaseServer5 ~]# ls -ld /var/backup/WALarchive/
drwx------. 2 postgres postgres 69632 Jan  4 08:40 /var/backup/WALarchive/
[root@databaseServer5 ~]# ls -ld /var/backup/WALarchive/*
-rw-------. 1 postgres postgres 16777216 Jan  4 08:36 /var/backup/WALarchive/000000010000000B0000009F
-rw-------. 1 postgres postgres 16777216 Jan  4 08:41 /var/backup/WALarchive/000000010000000B000000A0
[root@databaseServer5 ~]#

      I dis this as root, and I run systemctl as root. But maybe, if systemctl does anything as an unprivileged user, the permissions on /var/backup/WALarchive would cause a problem? I will try adjusting them.

-------- Original Message --------
Subject: Re: [NOVICE] Centos Hot-Standby, different Startup behavior
between systemctl & pg_ctl start.
From: Michael Wood <esiotrot@gmail.com>
Date: Sat, January 02, 2016 5:39 am
To: kurt@thepw.com
Cc: PostgreSQL List - Novice <pgsql-novice@postgresql.org>

Hi
I apologise if the quoting in my message is broken. Replying from my phone.
On 31 Dec 2015 10:31 PM, <kurt@thepw.com> wrote:
>
>
> Hello,
>      I am running postgresql on Centos 7.2, using postgresql from the standard Centos repository, which provides postgresql.
>
>      My goal is to run a Master and a hot-standby server via WAL-file archiving, and the standby machine seems to be working prop[erly as long as I start postgresql on it via pg_ctl on the command line as the postgres user. The logs in pg_log collect lots of messages like:
>
> "cp: cannot stat ‘/var/backup/WALarchive/0000000100000006000000FD’: No such file or directory"
What does the following output?
# ls -ld / /var /var/backup /var/backup/WALarchive /var/backup/WALarchive/*
> but eventually i see a line like:
>
> "LOG:  restored log file "0000000100000006000000FD" from archive"

pgsql-novice by date:

Previous
From: Killian Driscoll
Date:
Subject: How can I combine these two dependent views into one view?
Next
From: Chris Spencer
Date:
Subject: How to enable partial matching on a GIN index