[PATCH] /src/backend/access/transam/xlog.c, tiny improvements - Mailing list pgsql-hackers

From Ranier Vilela
Subject [PATCH] /src/backend/access/transam/xlog.c, tiny improvements
Date
Msg-id CAEudQAocMqfqt0t64HNo39Z73jMey60WmeryB+WFDg3BZpCf=g@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] /src/backend/access/transam/xlog.c, tiny improvements
List 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

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)
Next
From: Julien Rouhaud
Date:
Subject: Re: BUG #16109: Postgres planning time is high across version (Exposebuffer usage during planning in EXPLAIN)