Skip site navigation (1) Skip section navigation (2)

Re: Archiver not picking up changes to archive_command

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: bricklen <bricklen(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Archiver not picking up changes to archive_command
Date: 2010-05-11 04:21:16
Message-ID: AANLkTiniEcM9kHs0mOs8RUIoGkhipEJ7PR0DzDPd39qS@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
On Tue, May 11, 2010 at 9:50 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> bricklen <bricklen(at)gmail(dot)com> writes:
>> Due to some heavy processing today, we have been falling behind on
>> shipping log files (by about a 1000 logs or so), so wanted to up our
>> bwlimit like so:
>
>> rsync -a %p postgres(at)192(dot)168(dot)80(dot)174:/WAL_Archive/ && rsync
>> --bwlimit=1875 -az %p postgres(at)14(dot)121(dot)70(dot)98:/WAL_Archive/
>
>> The db is showing the change.
>> SHOW archive_command:
>> rsync -a %p postgres(at)192(dot)168(dot)80(dot)174:/WAL_Archive/ && rsync
>> --bwlimit=1875 -az %p postgres(at)14(dot)121(dot)70(dot)98:/WAL_Archive/
>
>> Yet, the running processes never get above the original bwlimit of
>> 1250. Have I missed a step? Would "kill -HUP <archiver pid>" help?
>> (I'm leery of trying that untested though)
>
> A look at the code shows that the archiver only notices SIGHUP once
> per outer loop, so the change would only take effect once you catch up,
> which is not going to help much in this case.  Possibly we should change
> it to check for SIGHUP after each archive_command execution.

+1

Here is the simple patch to do so.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment: pgarch_check_sighup_v1.patch
Description: application/octet-stream (456 bytes)

In response to

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2010-05-11 04:37:53
Subject: Re: Make archiver check for SIGHUP more often?
Previous:From: Carlos Jord√£oDate: 2010-05-11 03:19:48
Subject: Invitation to connect on LinkedIn

pgsql-general by date

Next:From: Yan Cheng CHEOKDate: 2010-05-11 05:38:15
Subject: Run Vacuum Through JDBC
Previous:From: Scott MarloweDate: 2010-05-11 03:07:38
Subject: Re: peer-to-peer replication with Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group