Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL 17 support #474

Closed
1 task done
devrimgunduz opened this issue Jul 16, 2024 · 7 comments
Closed
1 task done

PostgreSQL 17 support #474

devrimgunduz opened this issue Jul 16, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@devrimgunduz
Copy link

Description

2.0.4 fails to build against PostgreSQL 17. v17beta2 is already out. Can you please take a look?

Thanks, Devrim

Expected Results

.

Actual Results

/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-format-truncation -O2 -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include -flto=thin -emit-llvm -c -o pg_stat_monitor.bc pg_stat_monitor.c
pg_stat_monitor.c:1521:74: error: no member named 'blk_read_time' in 'struct BufferUsage'
1521 | e->counters.blocks.blk_read_time += INSTR_TIME_GET_MILLISEC(bufusage->blk_read_time);
| ~~~~~~~~ ^
/usr/pgsql-17/include/server/portability/instr_time.h:192:35: note: expanded from macro 'INSTR_TIME_GET_MILLISEC'
192 | ((double) INSTR_TIME_GET_NANOSEC(t) / NS_PER_MS)
| ^
/usr/pgsql-17/include/server/portability/instr_time.h:126:12: note: expanded from macro 'INSTR_TIME_GET_NANOSEC'
126 | ((int64) (t).ticks)
| ^
pg_stat_monitor.c:1522:75: error: no member named 'blk_write_time' in 'struct BufferUsage'
1522 | e->counters.blocks.blk_write_time += INSTR_TIME_GET_MILLISEC(bufusage->blk_write_time);
| ~~~~~~~~ ^
/usr/pgsql-17/include/server/portability/instr_time.h:192:35: note: expanded from macro 'INSTR_TIME_GET_MILLISEC'
192 | ((double) INSTR_TIME_GET_NANOSEC(t) / NS_PER_MS)
| ^
/usr/pgsql-17/include/server/portability/instr_time.h:126:12: note: expanded from macro 'INSTR_TIME_GET_NANOSEC'
126 | ((int64) (t).ticks)
| ^
pg_stat_monitor.c:1528:72: error: no member named 'blk_read_time' in 'struct BufferUsage'
1528 | memcpy((void *) &e->counters.blocks.instr_blk_read_time, &bufusage->blk_read_time, sizeof(instr_time));
| ~~~~~~~~ ^
pg_stat_monitor.c:1529:73: error: no member named 'blk_write_time' in 'struct BufferUsage'
1529 | memcpy((void *) &e->counters.blocks.instr_blk_write_time, &bufusage->blk_write_time, sizeof(instr_time));
| ~~~~~~~~ ^
pg_stat_monitor.c:1805:19: error: no member named 'blk_read_time' in 'struct BufferUsage'
1805 | memcpy(&bufusage.blk_read_time, &entry->counters.blocks.instr_blk_read_time, sizeof(instr_time));
| ~~~~~~~~ ^
pg_stat_monitor.c:1806:19: error: no member named 'blk_write_time' in 'struct BufferUsage'
1806 | memcpy(&bufusage.blk_write_time, &entry->counters.blocks.instr_blk_write_time, sizeof(instr_time));
| ~~~~~~~~ ^
pg_stat_monitor.c:2425:2: error: call to undeclared function 'tuplestore_donestoring'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
2425 | tuplestore_donestoring(tupstore);
| ^
7 errors generated.
make[1]: *** [/usr/pgsql-17/lib/pgxs/src/makefiles/../../src/Makefile.global:1085: pg_stat_monitor.bc] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /usr/pgsql-17/include/server/pgstat.h:15,
from pg_stat_monitor.c:23:
pg_stat_monitor.c: In function ‘pgsm_update_entry’:
pg_stat_monitor.c:1521:95: error: ‘BufferUsage’ has no member named ‘blk_read_time’; did you mean ‘temp_blk_read_time’?
1521 | e->counters.blocks.blk_read_time += INSTR_TIME_GET_MILLISEC(bufusage->blk_read_time);
| ^~~~~~~~~~~~~
/usr/pgsql-17/include/server/portability/instr_time.h:126:19: note: in definition of macro ‘INSTR_TIME_GET_NANOSEC’
126 | ((int64) (t).ticks)
| ^
pg_stat_monitor.c:1521:61: note: in expansion of macro ‘INSTR_TIME_GET_MILLISEC’
1521 | e->counters.blocks.blk_read_time += INSTR_TIME_GET_MILLISEC(bufusage->blk_read_time);
| ^~~~~~~~~~~~~~~~~~~~~~~
pg_stat_monitor.c:1522:96: error: ‘BufferUsage’ has no member named ‘blk_write_time’; did you mean ‘temp_blk_write_time’?
1522 | e->counters.blocks.blk_write_time += INSTR_TIME_GET_MILLISEC(bufusage->blk_write_time);
| ^~~~~~~~~~~~~~
/usr/pgsql-17/include/server/portability/instr_time.h:126:19: note: in definition of macro ‘INSTR_TIME_GET_NANOSEC’
126 | ((int64) (t).ticks)
| ^
pg_stat_monitor.c:1522:62: note: in expansion of macro ‘INSTR_TIME_GET_MILLISEC’
1522 | e->counters.blocks.blk_write_time += INSTR_TIME_GET_MILLISEC(bufusage->blk_write_time);
| ^~~~~~~~~~~~~~~~~~~~~~~
pg_stat_monitor.c:1528:93: error: ‘BufferUsage’ has no member named ‘blk_read_time’; did you mean ‘temp_blk_read_time’?
1528 | memcpy((void *) &e->counters.blocks.instr_blk_read_time, &bufusage->blk_read_time, sizeof(instr_time));
| ^~~~~~~~~~~~~
| temp_blk_read_time
pg_stat_monitor.c:1529:94: error: ‘BufferUsage’ has no member named ‘blk_write_time’; did you mean ‘temp_blk_write_time’?
1529 | memcpy((void *) &e->counters.blocks.instr_blk_write_time, &bufusage->blk_write_time, sizeof(instr_time));
| ^~~~~~~~~~~~~~
| temp_blk_write_time
pg_stat_monitor.c: In function ‘pgsm_store’:
pg_stat_monitor.c:1805:26: error: ‘BufferUsage’ has no member named ‘blk_read_time’; did you mean ‘temp_blk_read_time’?
1805 | memcpy(&bufusage.blk_read_time, &entry->counters.blocks.instr_blk_read_time, sizeof(instr_time));
| ^~~~~~~~~~~~~
| temp_blk_read_time
pg_stat_monitor.c:1806:26: error: ‘BufferUsage’ has no member named ‘blk_write_time’; did you mean ‘temp_blk_write_time’?
1806 | memcpy(&bufusage.blk_write_time, &entry->counters.blocks.instr_blk_write_time, sizeof(instr_time));
| ^~~~~~~~~~~~~~
| temp_blk_write_time
pg_stat_monitor.c: In function ‘pg_stat_monitor_internal’:
pg_stat_monitor.c:2425:9: error: implicit declaration of function ‘tuplestore_donestoring’; did you mean ‘tuplestore_rescan’? [-Wimplicit-function-declaration]
2425 | tuplestore_donestoring(tupstore);
| ^~~~~~~~~~~~~~~~~~~~~~
| tuplestore_rescan
make[1]: *** [: pg_stat_monitor.o] Error 1

Version

PostgreSQL 17 and pg_stat_monitor 2.0.4

Steps to reproduce

No response

Relevant logs

No response

Code of Conduct

  • I agree to follow Percona Community Code of Conduct
@devrimgunduz devrimgunduz added the bug Something isn't working label Jul 16, 2024
@artemgavrilov
Copy link
Contributor

Hello @devrimgunduz ! PG 17 support not yet released or merged to the main branch. Here is the PR: #463

Also you can track progress in this ticket: https://perconadev.atlassian.net/browse/PG-810

@artemgavrilov
Copy link
Contributor

@devrimgunduz good news, we just merged it! I hope that in two weeks we will ship new release.

@artemgavrilov artemgavrilov self-assigned this Jul 22, 2024
@devrimgunduz
Copy link
Author

Thanks! Any update with the release?

@artemgavrilov
Copy link
Contributor

Sorry for the delay, the release scope was a little bit changed. So in two weeks we plan to ship release candidate (without builds), but actual release (with builds) is planned to the end of August/start of September.

@artemgavrilov
Copy link
Contributor

@devrimgunduz Tag 2.1.0 was added, packages will be available later.

https://github.com/percona/pg_stat_monitor/releases/tag/2.1.0

@artemgavrilov
Copy link
Contributor

Hey @devrimgunduz we released binary packages for all supported PG versions. You can find them in percona repositories, as well as on PGXN and Trunk!

@devrimgunduz
Copy link
Author

I already pushed RPMs to the PostgreSQL RPM repo. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants