Re: Possibly a comment typo in xlogrecord.h

Lists: pgsql-hackers
From: Rahila Syed <rahilasyed90(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Possibly a comment typo in xlogrecord.h
Date: 2014-12-16 10:44:48
Message-ID: CAH2L28v34MnU37wQQLkwtZdBdXPaW6sN6kZMJFxRNGJfgwGyZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello,

The comment before declaration of XLogRecordBlockHeader says

>* 'data_length' is the length of the payload data associated with this,
> * and includes the possible full-page image, and rmgr-specific data. It

IIUC, data_length does not include associated full page image length.
Attached patch changes the comment as follows:

- * and includes the possible full-page image, and rmgr-specific data. It
- * does not include the XLogRecordBlockHeader struct itself.
+ * and includes the rmgr-specific data. It does not include the possible
+ * full page image and XLogRecordBlockHeader struct itself.

Thank you,
Rahila Syed

Attachment Content-Type Size
correct_comment_typo_XLogRecordBlockHeader.patch application/octet-stream 765 bytes

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Rahila Syed <rahilasyed90(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possibly a comment typo in xlogrecord.h
Date: 2014-12-16 13:44:22
Message-ID: 54903736.7000406@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 12/16/2014 12:44 PM, Rahila Syed wrote:
> Hello,
>
> The comment before declaration of XLogRecordBlockHeader says
>
>> * 'data_length' is the length of the payload data associated with this,
>> * and includes the possible full-page image, and rmgr-specific data. It
>
> IIUC, data_length does not include associated full page image length.
> Attached patch changes the comment as follows:
>
> - * and includes the possible full-page image, and rmgr-specific data. It
> - * does not include the XLogRecordBlockHeader struct itself.
> + * and includes the rmgr-specific data. It does not include the possible
> + * full page image and XLogRecordBlockHeader struct itself.

Thanks, fixed! I also reworded the comment slightly, hopefully it's more
readable now.

- Heikki