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

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] /src/backend/access/transam/xlog.c, tiny improvements
Date: 2020-01-24 20:48:59
Message-ID: CAEudQAocMqfqt0t64HNo39Z73jMey60WmeryB+WFDg3BZpCf=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
There are 3 tiny improvements to xlog.c code:

1. At function StartupXLOG (line 6370), the second test if
(ArchiveRecoveryRequested) is redundant and can secure removed.
2. At function StartupXLOG (line 7254) the var switchedTLI already been
tested before and the second test can secure removed.
3. At function KeepLogSeg (line 9357) the test if (slotSegNo <= 0), the
var slotSegNo is uint64 and not can be < 0.

As it is a critical file, even though small, these improvements, I believe
are welcome, because they improve readability.

regards,
Ranier Vilela

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2020-01-24 21:06:11 Re: BUG #16109: Postgres planning time is high across version (Expose buffer usage during planning in EXPLAIN)
Previous Message Andres Freund 2020-01-24 19:52:26 pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)