Re: Reducing the chunk header sizes on all memory context types - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: Reducing the chunk header sizes on all memory context types
Date
Msg-id 387c9d5d-bf17-b970-1f05-bbeb8bcb23e4@enterprisedb.com
Whole thread Raw
In response to Re: Reducing the chunk header sizes on all memory context types  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers

On 8/30/22 03:04, David Rowley wrote:
> On Tue, 30 Aug 2022 at 12:22, Tomas Vondra
> <tomas.vondra@enterprisedb.com> wrote:
>> I also suggested doing a similar check in MemoryChunkGetPointer, so that
>> we catch the issue earlier - right after we allocate the chunk. Any
>> opinion on that?
> 
> I think it's probably a good idea. However, I'm not yet sure if we can
> keep it as a macro or if it would need to become a static inline
> function to do that.
> 

I'd bet it can be done in the macro. See VARATT_EXTERNAL_GET_POINTER for
example of a "do" block with an Assert.

> What I'd really have wished for is a macro like AssertPointersEqual()
> that spat out the two pointer values. That would probably have saved
> more time on this issue.
> 

Hmm, maybe.

regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: pg_rewind WAL segments deletion pitfall
Next
From: Alexander Kukushkin
Date:
Subject: Re: pg_rewind WAL segments deletion pitfall