rafsun42 commented on PR #1266:
URL: https://github.com/apache/age/pull/1266#issuecomment-1947518753

   +1 for the palloc0 changes as PostgreSQL recommends it as well:
   
   https://www.postgresql.org/docs/current/xfunc-c.html
   > Always zero the bytes of your structures using memset (or allocate them 
with palloc0 in the first place). Even if you assign to each field of your 
structure, there might be alignment padding (holes in the structure) that 
contain garbage values. Without this, it's difficult to support hash indexes or 
hash joins, as you must pick out only the significant bits of your data 
structure to compute a hash. The planner also sometimes relies on comparing 
constants via bitwise equality, so you can get undesirable planning results if 
logically-equivalent values aren't bitwise equal.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to