Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7cMJ-006RJj-HB for pgsql-hackers@arkaria.postgresql.org; Thu, 16 May 2024 14:45:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s7cMH-00ABBP-Qf for pgsql-hackers@arkaria.postgresql.org; Thu, 16 May 2024 14:45:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7cMH-00ABBH-HE for pgsql-hackers@lists.postgresql.org; Thu, 16 May 2024 14:45:25 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7cME-000Vmj-D3 for pgsql-hackers@postgresql.org; Thu, 16 May 2024 14:45:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 44GEjIfo2096382; Thu, 16 May 2024 10:45:18 -0400 From: Tom Lane To: Peter Eisentraut cc: Robert Haas , Nathan Bossart , pgsql-hackers@postgresql.org Subject: Re: Why does pgindent's README say to download typedefs.list from the buildfarm? In-reply-to: <195c6c45-abce-4331-be6a-e87724e1d060@eisentraut.org> References: <20240422192218.GB367217@nathanxps13> <3154983.1713816488@sss.pgh.pa.us> <20240422202010.GA420168@nathanxps13> <20240423200455.GA850264@nathanxps13> <20240515192952.GA1428991@nathanxps13> <1833482.1715804603@sss.pgh.pa.us> <1919000.1715815925@sss.pgh.pa.us> <195c6c45-abce-4331-be6a-e87724e1d060@eisentraut.org> Comments: In-reply-to Peter Eisentraut message dated "Thu, 16 May 2024 12:03:30 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2096380.1715870718.1@sss.pgh.pa.us> Date: Thu, 16 May 2024 10:45:18 -0400 Message-ID: <2096381.1715870718@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > In these cases, I think for > NotificationHash > ResourceOwnerData > WalSyncMethod > we can just get rid of the typedef. I have no objection to dealing with NotificationHash as you have here. > ReadBuffersFlags shouldn't be an enum at all, because its values are > used as flag bits. Yeah, that was bothering me too, but I went for the minimum delta. I did think that a couple of integer macros would be a better idea, so +1 for what you did here. > WaitEventExtension, I'm not sure, it's like, an extensible enum? I > guess let's remove the typedef there, too. I am also quite confused by that. It seems to be kind of an enum that is supposed to be extended at runtime, meaning that neither of the existing enum member values ought to be used as such, although either autoprewarm.c didn't get the memo or I misunderstand the intended usage. NUM_BUILTIN_WAIT_EVENT_EXTENSION is possibly the most bizarre idea I've ever seen: what would a "built-in extension" event be exactly? I think the enum should be nuked altogether, but it's a bit late to be redesigning that for v17 perhaps. > Attached is a variant patch. I'm good with this, with a mental note to look again at WaitEventExtension later. regards, tom lane