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 1qQzpR-000Cms-28 for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Aug 2023 00:35:05 +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 1qQzpP-001Jwx-5Y for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Aug 2023 00:35:03 +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 1qQzpO-001Jwp-TA for pgsql-hackers@lists.postgresql.org; Wed, 02 Aug 2023 00:35:03 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qQzpM-0002MH-5W for pgsql-hackers@postgresql.org; Wed, 02 Aug 2023 00:35:02 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 4256860134; Wed, 2 Aug 2023 09:34:55 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 02 Aug 2023 09:34:55 +0900 From: Masahiro Ikeda To: Ranier Vilela Cc: Pg Hackers , Michael Paquier , Bharath Rupireddy , tristan@neon.tech, Andres Freund Subject: Re: Support to define custom wait events for extensions In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: ikedamsh@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-08-02 08:38, Ranier Vilela wrote: > Hi, > > On Tue, Aug 01, 2023 at 11:51:35AM +0900, Masahiro Ikeda wrote: >> Thanks for committing the main patch. > > Latest head > Ubuntu 64 bits > gcc 13 64 bits > > ./configure --without-icu > make clean > > make > > In file included from ../../src/include/pgstat.h:20, > from controldata_utils.c:38: > ../../src/include/utils/wait_event.h:56:9: error: redeclaration of > enumerator ‘WAIT_EVENT_EXTENSION’ > 56 | WAIT_EVENT_EXTENSION = PG_WAIT_EXTENSION, > | ^~~~~~~~~~~~~~~~~~~~ > In file included from ../../src/include/utils/wait_event.h:29, > from ../../src/include/pgstat.h:20, > from controldata_utils.c:38: > ../../src/include/utils/wait_event_types.h:60:9: note: previous > definition of ‘WAIT_EVENT_EXTENSION’ with type ‘enum > ’ > 60 | WAIT_EVENT_EXTENSION = PG_WAIT_EXTENSION > | ^~~~~~~~~~~~~~~~~~~~ > In file included from ../../src/include/pgstat.h:20, > from controldata_utils.c:38: > ../../src/include/utils/wait_event.h:58:3: error: conflicting types > for ‘WaitEventExtension’; have ‘enum ’ > 58 | } WaitEventExtension; > | ^~~~~~~~~~~~~~~~~~ > In file included from ../../src/include/utils/wait_event.h:29, > from ../../src/include/pgstat.h:20, > from controldata_utils.c:38: > ../../src/include/utils/wait_event_types.h:61:3: note: previous > declaration of ‘WaitEventExtension’ with type > ‘WaitEventExtension’ > 61 | } WaitEventExtension; > | ^~~~~~~~~~~~~~~~~~ > make[2]: *** [Makefile:174: controldata_utils_srv.o] Erro 1 > make[2]: Saindo do diretório '/usr/src/postgres_commits/src/common' > make[1]: *** [Makefile:42: all-common-recurse] Erro 2 > make[1]: Saindo do diretório '/usr/src/postgres_commits/src' > make: *** [GNUmakefile:11: all-src-recurse] Erro 2 > ranier@notebook2:/usr/src/postgres_commits$ grep -r --include '*.c' > "WAIT_EVENT_EXTESION" . > ranier@notebook2:/usr/src/postgres_commits$ grep -r --include '*.c' > "WAIT_EVENT_EXTENSION" . > > grep -r --include '*.h' "WAIT_EVENT_EXTENSION" . > ./src/backend/utils/activity/wait_event_types.h: WAIT_EVENT_EXTENSION > = PG_WAIT_EXTENSION > ./src/include/utils/wait_event.h: WAIT_EVENT_EXTENSION = > PG_WAIT_EXTENSION, > ./src/include/utils/wait_event.h: > WAIT_EVENT_EXTENSION_FIRST_USER_DEFINED > > Not sure if this is really a mistake in my environment. I can build without error. * latest commit(3845577cb55eab3e06b3724e307ebbcac31f4841) * gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) The result in my environment is $ grep -r --include '*.h' "WAIT_EVENT_EXTENSION" . ./src/include/utils/wait_event.h: WAIT_EVENT_EXTENSION = PG_WAIT_EXTENSION, ./src/include/utils/wait_event.h: WAIT_EVENT_EXTENSION_FIRST_USER_DEFINED I think the error occurred because the old wait_event_types.h still exists. Can you remove it before building and try again? $ make maintainer-clean # remove wait_event_types.h $ ./configure --without-icu $ make Regards, -- Masahiro Ikeda NTT DATA CORPORATION