Re: Enable WAL Archive in Replication server

From: Jov <amutu(at)amutu(dot)com>
To: "ascot(dot)moss(at)gmail(dot)com" <ascot(dot)moss(at)gmail(dot)com>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Enable WAL Archive in Replication server
Date: 2013-08-11 11:27:40
Message-ID: CADyrUxPX6LT0wFCiCtm32tA0EYdmDmp_V8+yeoM9UtrQhxDd8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

now you can only enable WAL archive on the Master server,it will not take
effect on replication server.

I can't find the doc which explicit prohibit WAL archive on the replication
server,and there are WAL generated in the slave pg_xlog dir with
archive_status subdir,so I think this may be a bug.

Jov
blog: http:amutu.com/blog <http://amutu.com/blog>

2013/8/11 ascot(dot)moss(at)gmail(dot)com <ascot(dot)moss(at)gmail(dot)com>

> Hi,
>
> I want to archive WAL log files in the replication server as well, the
> postgresql.conf is added with following new lines, after restarting PG, the
> /var/pgsql/data/archive/ is still empty after 1 hour:
>
>
> ### new lines added today
> #
> # to enable the replica as Hot Standby
> hot_standby = on
> #
> # to enable WAL archive (coped from master's conf)
> wal_level = hot_standby
> max_wal_senders = 5
> wal_keep_segments = 500
> wal_sync_method = fsync
> fsync = on
> archive_mode = on
> archive_command = 'test ! -f /var/pgsql/data/archive/%f && cp %p
> /var/pgsql/data/archive/%f'
> ###
>
> ls -la /var/pgsql/data/archive/
> total 8
> drwx------ 2 postgres root 4096 Aug 11 16:12 ./
> drwx------ 3 postgres root 4096 Aug 10 10:59 ../
>
> PG: 9.2.4
> OS: Ubuntu 12.04
>
> I am new to Streaming Replication, can you please advise why there is no
> WAL archive files found in the archive folder?
>
> regards
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jov 2013-08-11 11:36:33 Re: replication server: LOG: invalid magic number 0000 in log file 169, segment 77, offset 4325376
Previous Message ascot.moss@gmail.com 2013-08-11 08:32:12 Enable WAL Archive in Replication server

Browse pgsql-hackers by date

  From Date Subject
Next Message Jov 2013-08-11 11:36:33 Re: replication server: LOG: invalid magic number 0000 in log file 169, segment 77, offset 4325376
Previous Message ascot.moss@gmail.com 2013-08-11 08:32:12 Enable WAL Archive in Replication server