Heikki Linnakangas escreveu:
> On 01.12.2010 13:27, aaliya zarrin wrote:
>> I want to know how frequently postgres search for trigger file to switch
> In 9.0, every 100ms while streaming replication is active and connected.
> 5 seconds otherwise. In current git master branch, it's always 5 s.
>> Can this switch over time be reduced?
> Not without hacking the sources and compiling.
> Although, on many platforms, Linux included I believe, sending a signal
> to the startup process should wake it up from the sleep and make it
> check the trigger file immediately. "pg_ctl reload" for example should
> do it. So if ýou send a signal to the startup process immediately after
> creating the trigger file, it should take notice sooner.
Isn't it an ugly solution for stopping the replication immediately? At the top
of my head, I don't remember the reason for not turn the interval for pooling
trigger file into a configurable option. IMHO, high availability fits into
those cases (switchover immediately).
[poking the git history a little...]
I agree the a short polling interval is not energy efficient  but some
scenarios need this short interval. So if we want to stop the replication
immediately, we have two options: (i) advertise that we need to signal the
postmaster after creating a trigger file or (ii) made the pooling interval
configurable. As you said, there are platforms that a signal doesn't wake up a
process, so I suggest (ii) but I'm fine to include (i) at docs too.
Euler Taveira de Oliveira
In response to
pgsql-hackers by date
|Next:||From: Dimitri Fontaine||Date: 2010-12-01 15:21:50|
|Subject: Re: pg_execute_from_file review|
|Previous:||From: ghatpande||Date: 2010-12-01 15:15:25|
|Subject: Re: Proposal: First step towards Intelligent,