Re: Support to define custom wait events for extensions

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, "tristan(at)neon(dot)tech" <tristan(at)neon(dot)tech>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Support to define custom wait events for extensions
Date: 2023-08-01 23:38:40
Message-ID: CAEudQAqJF=ENDUNPnBgTF2T7-a9fNdqt-GUUvuid+cQc+gka8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 <anonymous>’
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 <anonymous>’
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(at)notebook2:/usr/src/postgres_commits$ grep -r --include '*.c'
"WAIT_EVENT_EXTESION" .
ranier(at)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.

regards,
Ranier Vilela

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2023-08-01 23:39:54 Re: Incorrect handling of OOM in WAL replay leading to data loss
Previous Message Andy Fan 2023-08-01 23:33:37 Re: Extract numeric filed in JSONB more effectively