Re: Add Information during standby recovery conflicts

Drouvot, Bertrand <bdrouvot@amazon.com>

From: "Drouvot, Bertrand" <bdrouvot@amazon.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-10-12T07:05:05Z
Lists: pgsql-hackers

Attachments

Hi,

On 10/4/20 4:10 PM, Alvaro Herrera wrote
>> +extern const char *get_procsignal_reason_desc(ProcSignalReason reason)
>> +     {
>> +             const char *reasonDesc = "unknown reason";
>> +
>> +             switch (reason)
>> +             {
>> +                     case PROCSIG_RECOVERY_CONFLICT_BUFFERPIN:
>> +                             reasonDesc = "buffer pin";
>> +                             break;
> It doesn't work to construct sentences from pieces, for translatability
> reasons.  Maybe you can return the whole errmsg sentence from this
> routine instead.
>
Thanks for the feedback!

Enclosed a new version that take care of it.

Bertrand

Commits

  1. Log long wait time on recovery conflict when it's resolved.

  2. Add GUC to log long wait times on recovery conflicts.

  3. Detect the deadlocks between backends and the startup process.

  4. Get rid of the dedicated latch for signaling the startup process.

  5. Add block information in error context of WAL REDO apply loop