Re: [PATCH] /src/backend/access/transam/xlog.c, tiny improvements

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Cc: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] /src/backend/access/transam/xlog.c, tiny improvements
Date: 2020-01-27 07:55:56
Message-ID: 20200127075556.GE4913@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 26, 2020 at 06:47:57PM -0800, Mark Dilger wrote:
> There is something unusual about comparing a XLogSegNo variable in
> this way, but it seems to go back to 2014 when the replication slots
> were introduced in commit 858ec11858a914d4c380971985709b6d6b7dd6fc,
> and XLogSegNo was unsigned then, too. Depending on how you look at
> it, this could be a thinko, or it could be defensive programming
> against future changes to the XLogSegNo typedef. I’m betting it was
> defensive programming, given the context. As such, I don’t think it
> would be appropriate to remove this defense in your patch.

Yeah. To e honest, I am not actually sure if it is worth bothering
about any of those three places.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2020-01-27 08:49:09 Re: Setting min/max TLS protocol in clientside libpq
Previous Message Surafel Temesgen 2020-01-27 07:15:23 Re: can we use different function in place of atoi in vacuumdb.c file