Incorrect comment of XLByteToSeg() and XLByteToPrevSeg()

Started by Yugo Nagataover 9 years ago4 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

never appliedsuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t37128
psql -h localhost -U postgres

Built from patchset v1 (message #1), July 28, 2026 at 02:16 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t37128_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t37128_1 && git checkout t37128_1

Patchset v1 (message #1) is on t37128_1

Jump to latest
#1Yugo Nagata
nagata@sraoss.co.jp

Hi,

I found a type in the comment for XLByteToSeg() and XLByteToPrevSeg().
This says "Compute ID and segment from an XLogRecPtr", but these
macros compute only segment numbers. I think "Compute a segment number
from an XLogRecPtr" is correct.

The definition of these macros were modified by the following commit,
but the comment were not.

commit dfda6ebaec6763090fb78b458a979b558c50b39b
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Sun Jun 24 18:06:38 2012 +0300

Regards,

--
Yugo Nagata <nagata@sraoss.co.jp>

Attachments:

t37128_1
xlog_internal.patchtext/x-diff; name=xlog_internal.patchDownload+1-1
#2Tatsuo Ishii
ishii@postgresql.org
In reply to: Yugo Nagata (#1)
Re: Incorrect comment of XLByteToSeg() and XLByteToPrevSeg()

I found a type in the comment for XLByteToSeg() and XLByteToPrevSeg().
This says "Compute ID and segment from an XLogRecPtr", but these
macros compute only segment numbers. I think "Compute a segment number
from an XLogRecPtr" is correct.

The definition of these macros were modified by the following commit,
but the comment were not.

commit dfda6ebaec6763090fb78b458a979b558c50b39b
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Sun Jun 24 18:06:38 2012 +0300

Thanks for the patch. Looks good to me. I will commit/push into all
supported branches if there's no objection.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Tatsuo Ishii
ishii@postgresql.org
In reply to: Tatsuo Ishii (#2)
Re: Incorrect comment of XLByteToSeg() and XLByteToPrevSeg()

Thanks for the patch. Looks good to me. I will commit/push into all
supported branches if there's no objection.

Done.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Yugo Nagata
nagata@sraoss.co.jp
In reply to: Tatsuo Ishii (#3)
Re: Incorrect comment of XLByteToSeg() and XLByteToPrevSeg()

On Tue, 01 Aug 2017 08:11:23 +0900 (JST)
Tatsuo Ishii <ishii@sraoss.co.jp> wrote:

Thanks for the patch. Looks good to me. I will commit/push into all
supported branches if there's no objection.

Done.

Thanks!

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

--
Yugo Nagata <nagata@sraoss.co.jp>

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers