Wrong variable type in KeepLogSeg

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Wrong variable type in KeepLogSeg
Date: 2017-02-28 02:17:21
Message-ID: 20170228.111721.252692910.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, I found a variable definition with wrong type
specification in KeepLogSeg, which doesn't harm anything.

> static void
> KeepLogSeg(XLogRecPtr recptr, XLogSegNo *logSegNo)
> {
> ...
> /* then check whether slots limit removal further */
> if (max_replication_slots > 0 && keep != InvalidXLogRecPtr)
> {
> XLogRecPtr slotSegNo;
>
> XLByteToSeg(keep, slotSegNo);

slotSegNo should be a XLogSegNo. Both types share the same
intrinsic type so it doesn't harm anything.

This is back-patchable upto 9.4.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
KeepLogSeg_wrongtype.patch text/x-patch 473 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-02-28 02:30:22 Re: Radix tree for character conversion
Previous Message Haribabu Kommi 2017-02-28 01:48:31 Re: utility commands benefiting from parallel plan