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

Re: Hi- How frequently Postgres Poll for trigger file

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: aaliya zarrin <aaliya(dot)zarrin(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hi- How frequently Postgres Poll for trigger file
Date: 2010-12-01 15:16:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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
>> over.
> 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 [1] 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 FontaineDate: 2010-12-01 15:21:50
Subject: Re: pg_execute_from_file review
Previous:From: ghatpandeDate: 2010-12-01 15:15:25
Subject: Re: Proposal: First step towards Intelligent, integrateddatabase

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