Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V8Yte-0000mF-QX for pgsql-bugs@arkaria.postgresql.org; Sun, 11 Aug 2013 16:53:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V8Yte-0001Sd-62 for pgsql-bugs@arkaria.postgresql.org; Sun, 11 Aug 2013 16:53:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V8Ytd-0001SV-5x for pgsql-bugs@postgresql.org; Sun, 11 Aug 2013 16:53:37 +0000 Received: from mail-pd0-x22c.google.com ([2607:f8b0:400e:c02::22c]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V8YtV-0006pM-KU for pgsql-bugs@postgresql.org; Sun, 11 Aug 2013 16:53:36 +0000 Received: by mail-pd0-f172.google.com with SMTP id z10so2458581pdj.3 for ; Sun, 11 Aug 2013 09:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=HZxHSsjUnf7FH5HDwaW6bJN2NPdAhtQMa6aQ4/Q8K9Y=; b=0vcKj1yA/XY3+ZNGt/hbg4V5r386LhBIzzHqeqW7zWf2nEOx5AZfOS9lM7AmMb6di4 nwL4LQ4U44JP5VyEUFY6qg7I00kwy7VaXenBqjESI5m/HeCi/NXfEql3Xg/JpElxXGV9 6Tpsfrjf2v+8P1lhhthM+k8jv758flcZySc5mB+oAhiaJlXJxVyuos8fcivBk2zyOwO3 gWCAPR2afBUzXXWL13tljiUGMebRsiXWVAM/Uk6STAlKVkoqqsUpCQi3hVs8MhTyklWr 4kwdirP37XViA11qzw7vN7c/r8wi8XM2JEnn81yIglWjdcQODJqkQmPw8HVTbDLXy4vw 6Lrg== X-Received: by 10.68.233.134 with SMTP id tw6mr20967508pbc.9.1376240007967; Sun, 11 Aug 2013 09:53:27 -0700 (PDT) Received: from [192.168.0.102] (014136185055.ctinets.com. [14.136.185.55]) by mx.google.com with ESMTPSA id om2sm32105397pbc.30.2013.08.11.09.53.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 11 Aug 2013 09:53:27 -0700 (PDT) Subject: Enable WAL Archive in Replication server Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: multipart/alternative; boundary=Apple-Mail-92-648329579 From: "ascot.moss@gmail.com" In-Reply-To: Date: Mon, 12 Aug 2013 00:53:24 +0800 Cc: ascot.moss@gmail.com Message-Id: <97FD6E50-F284-4317-8266-082D9E4769DC@gmail.com> References: To: pgsql-bugs@postgresql.org X-Mailer: Apple Mail (2.1085) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --Apple-Mail-92-648329579 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, I want to enable WAL archive on the replica, I am advised that WAL = archive can only be enabled on the Master, can you please advise if this = is a bug and any workaround available? regards 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.=20 Jov blog: http:amutu.com/blog 2013/8/11 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 =3D on # # to enable WAL archive (coped from master's conf) wal_level =3D hot_standby max_wal_senders =3D 5 wal_keep_segments =3D 500 wal_sync_method =3D fsync fsync =3D on archive_mode =3D on archive_command =3D '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 --Apple-Mail-92-648329579 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Hi,

I want to = enable WAL archive on the replica, I am advised that WAL archive can = only be enabled on the Master, can you please advise if this is a bug = and any workaround available?

regards





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. 



2013/8/11

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 =3D = on
#
# to enable WAL archive (coped from master's = conf)
wal_level =3D hot_standby
max_wal_senders =3D = 5
wal_keep_segments =3D 500
wal_sync_method =3D fsync
fsync =3D = on
archive_mode =3D on
archive_command =3D '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
= --Apple-Mail-92-648329579--