Unused stricture field in xlogreader:DecodedBkpBlock

Started by Mikhail Gribkov3 months ago4 messages
#1Mikhail Gribkov
youzhick@gmail.com
1 attachment(s)

Hi hackers,

I found that DecodedBkpBlock.data_bufsz field in xlogreader.h is never ever
used in the current code and not even mentioned in any comments. It just
occupies memory and removing it doesn't seem to break anything.
Should we remove it maybe? Attached is the removal patch.
--
best regards,
Mikhail A. Gribkov

e-mail: youzhick@gmail.com
*http://www.flickr.com/photos/youzhick/albums
<http://www.flickr.com/photos/youzhick/albums&gt;*
http://www.strava.com/athletes/5085772
phone: +7(916)604-71-12
Telegram: @youzhick

Attachments:

v1-Remove-unused-data_bufsz.patchapplication/octet-stream; name=v1-Remove-unused-data_bufsz.patchDownload
diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h
index 9738462d3c..dfabbbd57d 100644
--- a/src/include/access/xlogreader.h
+++ b/src/include/access/xlogreader.h
@@ -145,7 +145,6 @@ typedef struct
 	bool		has_data;
 	char	   *data;
 	uint16		data_len;
-	uint16		data_bufsz;
 } DecodedBkpBlock;
 
 /*
#2Nazir Bilal Yavuz
byavuz81@gmail.com
In reply to: Mikhail Gribkov (#1)
Re: Unused stricture field in xlogreader:DecodedBkpBlock

Hi,

On Fri, 17 Oct 2025 at 14:37, Mikhail Gribkov <youzhick@gmail.com> wrote:

Hi hackers,

I found that DecodedBkpBlock.data_bufsz field in xlogreader.h is never ever used in the current code and not even mentioned in any comments. It just occupies memory and removing it doesn't seem to break anything.
Should we remove it maybe? Attached is the removal patch.

Thanks for the patch! It looks like it should have been removed in the
3f1ce97346.

--
Regards,
Nazir Bilal Yavuz
Microsoft

#3Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Nazir Bilal Yavuz (#2)
Re: Unused stricture field in xlogreader:DecodedBkpBlock

On Fri, Oct 17, 2025 at 5:06 AM Nazir Bilal Yavuz <byavuz81@gmail.com> wrote:

Hi,

On Fri, 17 Oct 2025 at 14:37, Mikhail Gribkov <youzhick@gmail.com> wrote:

Hi hackers,

I found that DecodedBkpBlock.data_bufsz field in xlogreader.h is never ever used in the current code and not even mentioned in any comments. It just occupies memory and removing it doesn't seem to break anything.
Should we remove it maybe? Attached is the removal patch.

Thanks for the patch! It looks like it should have been removed in the
3f1ce97346.

+1 to remove it. I'll push the patch, barring objections.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

#4Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Masahiko Sawada (#3)
Re: Unused stricture field in xlogreader:DecodedBkpBlock

On Fri, Oct 17, 2025 at 11:22 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Fri, Oct 17, 2025 at 5:06 AM Nazir Bilal Yavuz <byavuz81@gmail.com> wrote:

Hi,

On Fri, 17 Oct 2025 at 14:37, Mikhail Gribkov <youzhick@gmail.com> wrote:

Hi hackers,

I found that DecodedBkpBlock.data_bufsz field in xlogreader.h is never ever used in the current code and not even mentioned in any comments. It just occupies memory and removing it doesn't seem to break anything.
Should we remove it maybe? Attached is the removal patch.

Thanks for the patch! It looks like it should have been removed in the
3f1ce97346.

+1 to remove it. I'll push the patch, barring objections.

Pushed.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com