Re: Safer hash table initialization macro

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Safer hash table initialization macro
Date: 2026-01-26 10:26:11
Message-ID: aXdBQ+fBKUcqLPzN@ip-10-97-1-34.eu-west-3.compute.internal
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-01-26 10:29:42 Re: Make copyObject work in C++
Previous Message Peter Eisentraut 2026-01-26 10:20:04 Re: get rid of Pointer type, mostly