Re: Add Information during standby recovery conflicts

From: "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add Information during standby recovery conflicts
Date: 2020-11-27 09:07:40
Message-ID: 61a9ad81-9436-dbf2-22a5-044843aa6ba3@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 11/27/20 6:04 AM, Masahiko Sawada wrote:
> Thank you for updating the patch! The patch works fine and looks good
> to me except for the following small comments:
>
> +/*
> + * Log the recovery conflict.
> + *
> + * waitStart is the timestamp when the caller started to wait. This
> function also
> + * reports the details about the conflicting process ids if *waitlist
> is not NULL.
> + */
> +void
> +LogRecoveryConflict(ProcSignalReason reason, TimestampTz waitStart,
> + TimestampTz cur_ts,
> VirtualTransactionId *waitlist)
>
> I think it's better to explain cur_ts as well in the function comment.
>
> Regarding the function arguments, 'waitStart' is camel case whereas
> 'cur_ts' is snake case and 'waitlist' is using only lower cases. I
> think we should unify them.
>
> ---
> -ResolveRecoveryConflictWithLock(LOCKTAG locktag)
> +ResolveRecoveryConflictWithLock(LOCKTAG locktag, bool logged_recovery_conflict)
>
> The function argument name 'logged_recovery_conflict' sounds a bit
> redundant to me as this function is used only for recovery conflict
> resolution. How about 'need_log' or something? Also it’s better to
> explain it in the function comment.

Thanks for reviewing!

I have addressed your comments in the new attached version.

Thanks

Bertrand

Attachment Content-Type Size
v9-0004-Log-the-standby-recovery-conflict-waits.patch text/plain 18.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2020-11-27 09:13:48 Re: [HACKERS] [PATCH] Generic type subscripting
Previous Message Alexander Korotkov 2020-11-27 09:07:26 Re: Improving spin-lock implementation on ARM.