Re: Add Information during standby recovery conflicts
Drouvot, Bertrand <bdrouvot@amazon.com>
From: "Drouvot, Bertrand" <bdrouvot@amazon.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-11-16T07:55:37Z
Lists: pgsql-hackers
Attachments
- v8-0004-Log-the-standby-recovery-conflict-waits.patch (text/plain) patch v8-0004
Hi, On 11/16/20 6:44 AM, Masahiko Sawada wrote: > Thank you for updating the patch. > > Here are review comments. > > + if (report_waiting && (!logged_recovery_conflict || > new_status == NULL)) > + ts = GetCurrentTimestamp(); > > The condition will always be true if log_recovery_conflict_wait is > false and report_waiting is true, leading to unnecessary calling of > GetCurrentTimestamp(). > > --- > + <para> > + You can control whether a log message is produced when the startup process > + is waiting longer than <varname>deadlock_timeout</varname> for recovery > + conflicts. This is controled by the <xref > linkend="guc-log-recovery-conflict-waits"/> > + parameter. > + </para> > > s/controled/controlled/ > > --- > if (report_waiting) > waitStart = GetCurrentTimestamp(); > > Similarly, we have the above code but we don't need to call > GetCurrentTimestamp() if update_process_title is false, even if > report_waiting is true. > > I've attached the patch that fixes the above comments. It can be > applied on top of your v8 patch. Thanks for the review and the associated fixes! I've attached a new version that contains your fixes. Thanks Bertrand
Commits
-
Log long wait time on recovery conflict when it's resolved.
- 39b03690b529 14.0 landed
-
Add GUC to log long wait times on recovery conflicts.
- 0650ff23038b 14.0 landed
-
Detect the deadlocks between backends and the startup process.
- 8900b5a9d59a 14.0 cited
-
Get rid of the dedicated latch for signaling the startup process.
- ac22929a2613 14.0 cited
-
Add block information in error context of WAL REDO apply loop
- 9d0bd95fa90a 14.0 cited