Re: Safer hash table initialization macro - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Safer hash table initialization macro
Date
Msg-id aXdBQ+fBKUcqLPzN@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Safer hash table initialization macro  ("Jelte Fennema-Nio" <postgres@jeltef.nl>)
Responses Re: Safer hash table initialization macro
List pgsql-hackers
Hi,

On Mon, Jan 26, 2026 at 11:05:49AM +0100, Jelte Fennema-Nio wrote:
> On Mon Jan 26, 2026 at 9:41 AM CET, Bertrand Drouvot wrote:
> > Also, I can see (I think it's coming from 0004):
> 
> Are you sure you applied the latest one, I had seen that in CI and fixed
> it in v7. Should definitely be fixed now at least.

I can still see it. If I apply from 0001 to 0004 and compile, I see it. It looks
like it's fixed in 0005:

index 54a418a2503..e102adf9f83 100644
--- a/src/backend/utils/cache/typcache.c
+++ b/src/backend/utils/cache/typcache.c
@@ -2409,14 +2409,13 @@ InvalidateCompositeTypeCacheEntry(TypeCacheEntry *typentry)
 static void
 TypeCacheRelCallback(Datum arg, Oid relid)
 {
-       TypeCacheEntry *typentry;
-
        /*
         * RelIdToTypeIdCacheHash and TypeCacheHash should exist, otherwise this
         * callback wouldn't be registered
         */
        if (OidIsValid(relid))
        {
+               TypeCacheEntry *typentry;
                RelIdToTypeIdCacheEntry *relentry;

                /*


but I think that the fix should be in 0004 so that each sub-patch compile without
warnings.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: get rid of Pointer type, mostly
Next
From: Peter Eisentraut
Date:
Subject: Re: Make copyObject work in C++