[bug fix] Stats collector is not restarted on the standby

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: [bug fix] Stats collector is not restarted on the standby
Date: 2016-10-26 05:46:23
Message-ID: 0A3221C70F24FB45833433255569204D1F636A1D@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

If the stats collector is forcibly terminated on the standby in streaming replication configuration, it won't be restarted until 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

Regards
Takayuki Tsunakawa

Attachment Content-Type Size
stats_collector_not_restarted.patch application/octet-stream 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2016-10-26 05:51:17
Previous Message vinayak 2016-10-26 05:37:03 Minor typo in reorderbuffer.c