On Wed, Feb 18, 2026 at 8:40 PM Alvaro Herrera <[email protected]> wrote:
>
> On 2026-Feb-16, Alvaro Herrera wrote:
>
> > > FWIW, your patch that you sent subsequently doesn't seem to apply
> > > cleanly for me? I think it's perhaps based on an older tree, it
> > > doesn't know about the conflict.h include yet...  And it fails to
> > > build e.g. due to miscadmin.h defines around BackendType not being
> > > indirectly included in pgstat.h anymore, but there are many other
> > > failures...
> >
> > Yeah, I just wrote it on (almost) clean master, but feel free to push
> > your changes whenever, and I'll rebase on top of that.
>
> Actually, being more surgical and removing only wait_event.h, the
> attached patch applies and compiles cleanly -- after yours this time,
> rather than on master.  I think this is the most significant change
> because of it including the generated file.  Given that pgstat.h is not
> _so_ widely used, I think leaving the other includes there doesn't hurt
> all that much anyway.
>

After pushing the patch for removing worker_internal.h from pgstat.h,
I tried this patch, but it failed to apply for pgstat.h. I fixed that
manually and tried to build on mac and windows. I see the following
problems.

On Windows (using meson build):
==========================
[951/2089] Compiling C object
src/backend/postgres_lib.a.p/utils_adt_pgstatfuncs.c.obj
../src/backend/utils/adt/pgstatfuncs.c(473): warning C4047: '=':
'const char *' differs in levels of indirection from 'int'
../src/backend/utils/adt/pgstatfuncs.c(474): warning C4047: '=':
'const char *' differs in levels of indirection from 'int'
../src/backend/utils/adt/pgstatfuncs.c(833): warning C4047: '=':
'const char *' differs in levels of indirection from 'int'
../src/backend/utils/adt/pgstatfuncs.c(860): warning C4047: '=':
'const char *' differs in levels of indirection from 'int'
...
...
[1472/2089] Linking target src/backend/postgres.exe
FAILED: [code=1120] src/backend/postgres.exe src/backend/postgres.pdb
"link" @src/backend/postgres.exe.rsp
   Creating library src\backend\postgres.lib
access_transam_xact.c.obj : error LNK2019: unresolved external symbol
pgstat_report_wait_end referenced in function AbortTransaction
postmaster_auxprocess.c.obj : error LNK2001: unresolved external
symbol pgstat_report_wait_end
storage_file_fd.c.obj : error LNK2001: unresolved external symbol
pgstat_report_wait_end
storage_ipc_waiteventset.c.obj : error LNK2001: unresolved external
symbol pgstat_report_wait_end
storage_file_fd.c.obj : error LNK2019: unresolved external symbol
pgstat_report_wait_start referenced in function FileReadV
storage_ipc_waiteventset.c.obj : error LNK2001: unresolved external
symbol pgstat_report_wait_start
src\backend\postgres.exe : fatal error LNK1120: 2 unresolved externals

On Mac:
=======
xact.c:2855:2: error: call to undeclared function
'pgstat_report_wait_end'; ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]
 2855 |         pgstat_report_wait_end();
      |         ^
xact.c:5263:2: error: call to undeclared function
'pgstat_report_wait_end'; ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]
 5263 |         pgstat_report_wait_end();
      |         ^
2 errors generated.

Do let me know if everything is good at your end, I can retry to see
if there are any dev-environment issues at my end.

-- 
With Regards,
Amit Kapila.


Reply via email to