Re: [HACKERS] Wrong variable type in KeepLogSeg
At Tue, 28 Feb 2017 12:21:01 +0100, Magnus Hagander wrote in magnus> > Hello, I found a variable definition with wrong type magnus> > specification in KeepLogSeg, which doesn't harm anything. magnus> magnus> Nice catch. Applied and backpatched. Thank you for committing. regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Wrong variable type in KeepLogSeg
On Tue, Feb 28, 2017 at 3:17 AM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > 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) > > { > > XLogRecPtrslotSegNo; > > > > 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. > Nice catch. Applied and backpatched. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
Re: [HACKERS] Wrong variable type in KeepLogSeg
At Tue, 28 Feb 2017 12:17:07 +0900, Michael Paquier wrote in > On Tue, Feb 28, 2017 at 11:17 AM, Kyotaro HORIGUCHI > wrote: > > slotSegNo should be a XLogSegNo. Both types share the same > > intrinsic type so it doesn't harm anything. > > Nice catch! Thanks! -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Wrong variable type in KeepLogSeg
On Tue, Feb 28, 2017 at 11:17 AM, Kyotaro HORIGUCHI wrote: > slotSegNo should be a XLogSegNo. Both types share the same > intrinsic type so it doesn't harm anything. Nice catch! -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] Wrong variable type in KeepLogSeg
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) > { > XLogRecPtrslotSegNo; > > 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 diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 5016273..8973583 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -9263,7 +9263,7 @@ KeepLogSeg(XLogRecPtr recptr, XLogSegNo *logSegNo) /* then check whether slots limit removal further */ if (max_replication_slots > 0 && keep != InvalidXLogRecPtr) { - XLogRecPtr slotSegNo; + XLogSegNo slotSegNo; XLByteToSeg(keep, slotSegNo); -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers