Re: zheap: a new storage format for PostgreSQL - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: zheap: a new storage format for PostgreSQL
Date
Msg-id e9dedb45-353a-fa55-5c9b-93b1468a8547@2ndquadrant.com
Whole thread Raw
In response to Re: zheap: a new storage format for PostgreSQL  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: zheap: a new storage format for PostgreSQL
List pgsql-hackers
On 11/5/18 4:00 AM, Amit Kapila wrote:
> On Sat, Nov 3, 2018 at 9:30 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>> On Fri, Nov 2, 2018 at 6:41 PM Tomas Vondra
>> <tomas.vondra@2ndquadrant.com> wrote:
>>> I'm sure
>>> it's not the only place where we do something like this, and the other
>>> places don't trigger the valgrind warning, so how do those places do
>>> this? heapam seems to call fetch_att in the end, which essentially calls
>>> Int32GetDatum/Int16GetDatum/CharGetDatum, so why not to use the same
>>> trick here?
>>>
>>
>> This is because, in zheap, we have omitted all alignment padding for
>> pass-by-value types.  See the description in my previous email [1].  I
>> think here we need to initialize ret_datum at the beginning of the
>> function unless you have some better idea.
>>
> 
> I have pushed a fix on the above lines in zheap-branch, but I am open
> to change it if you have better ideas for the same.
> 

Thanks. Initializing the variable seems like the right fix here.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Jean-Christophe Arnu
Date:
Subject: Re: wal_dump output on CREATE DATABASE
Next
From: Dmitry Dolgov
Date:
Subject: Re: Flexible permissions for REFRESH MATERIALIZED VIEW