public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bertrand Drouvot <[email protected]>
To: Jelte Fennema-Nio <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: [email protected]
Subject: Re: Safer hash table initialization macro
Date: Mon, 26 Jan 2026 08:41:53 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAGECzQSnhom3wFnY6a7xepGfxzzVmwyNCcJQE=y8UYS-g2G=RQ@mail.gmail.com>
	<CA+hUKGLZPZ4DgJs46-dkkkF5pi0gm23SerJY0HbOUP5r7siPsg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<aWdMaa/[email protected]>
	<[email protected]>
	<[email protected]>

Hi,

On Mon, Jan 26, 2026 at 12:38:15AM +0100, Jelte Fennema-Nio wrote:
> On Wed Jan 14, 2026 at 9:46 AM CET, Jelte Fennema-Nio wrote:
> > Changed wording and changed to NOTE.
> 
> Attached is v7 which is rebased and changed the hash_create calls
> introduced by 282b1cde9de.

Thanks!

The changes make sense to me.

Just a pgindent nit, in 0003:

$ git diff
diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c
index 73f93512f9b..0a1e7c709c9 100644
--- a/src/backend/commands/async.c
+++ b/src/backend/commands/async.c
@@ -3162,8 +3162,8 @@ AddEventToPendingNotifies(Notification *n)
                Assert(pendingNotifies->uniqueChannelHash == NULL);
                pendingNotifies->uniqueChannelHash =
                        hash_make_cxt(ChannelName, channel, "Pending Notify Channel Names",
-                                                        64L,
-                                                        CurTransactionContext);
+                                                 64L,
+                                                 CurTransactionContext);


Also, I can see (I think it's coming from 0004):

In file included from ../../../../src/include/access/hash.h:28,
                 from typcache.c:46:
typcache.c: In function ‘TypeCacheRelCallback’:
typcache.c:2472:46: warning: declaration of ‘typentry’ shadows a previous local [-Wshadow=compatible-local]
 2472 |                 foreach_hash(TypeCacheEntry, typentry, TypeCacheHash)
      |                                              ^~~~~~~~
../../../../src/include/utils/hsearch.h:314:20: note: in definition of macro ‘foreach_hash’
  314 |         for (type *var = NULL, *var##__outerloop = (type *) 1; \
      |                    ^~~
typcache.c:2412:25: note: shadowed declaration is here
 2412 |         TypeCacheEntry *typentry;
      |                         ^~~~~~~~

Regards,

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






view thread (6+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Safer hash table initialization macro
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox