Re: [bug fix] Stats collector is not restarted on the standby - Mailing list pgsql-hackers

From Kuntal Ghosh
Subject Re: [bug fix] Stats collector is not restarted on the standby
Date
Msg-id CAGz5QCL3L-_N8_SshjpywaENeyEc-GcetTBBxvr4mA4YY42bpg@mail.gmail.com
Whole thread Raw
In response to Re: [bug fix] Stats collector is not restarted on the standby  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [bug fix] Stats collector is not restarted on the standby
List pgsql-hackers
On Wed, Oct 26, 2016 at 12:10 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Wed, Oct 26, 2016 at 2:46 PM, Tsunakawa, Takayuki
> <tsunakawa.takay@jp.fujitsu.com> wrote:
>> If the stats collector is forcibly terminated on the standby in streaming replication configuration, it won't be
restarteduntil the standby is promoted to the primary.  The attached patch restarts the stats collector on the
standby.
>>
>> FYI, when the stats collector is down, SELECTs against the statistics views get stale data with the following
message.
>>
>> LOG:  using stale statistics instead of current ones because stats collector is not responding
>> STATEMENT:  select * from pg_stat_user_tables
>
> Oops. This could be a problem for some applications... As far as I can
> see and after playing with it, your patch looks correct.
> --
I've tested with the patch. The patch doesn't solve the problem
completely. In standby, after forcible termination, statistics
collector process is taking some time to get restarted. In between, if
somebody SELECTs against the statistics views, he will still get stale
data with the above LOG message.

-- 
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Declarative partitioning - another take
Next
From: Thomas Munro
Date:
Subject: Measuring replay lag