powa-team / pg_stat_kcache

Gather statistics about physical disk access and CPU consumption done by backends.
Other
214 stars 24 forks source link

pg 15 compatibility #33

Closed RekGRpth closed 2 years ago

RekGRpth commented 2 years ago
shared_preload_libraries = '...,pg_stat_kcache,...'
pg_ctl -w start
waiting for server to start....2022-07-01 06:45:51.050 UTC [190] LOG:  Auto detecting pg_stat_kcache.linux_hz parameter...
2022-07-01 06:45:51.050 UTC [190] LOG:  pg_stat_kcache.linux_hz is set to 1000000
2022-07-01 06:45:51.051 UTC [190] FATAL:  cannot request additional shared memory outside shmem_request_hook
2022-07-01 06:45:51.051 UTC [190] LOG:  database system is shut down
pg_ctl: could not start server
rjuju commented 2 years ago

This was properly handled a month and a half ago with https://github.com/powa-team/pg_stat_kcache/commit/1f9fb67813f608a31109b79aeb8d10c203f8ea7c, released in version 2.2.1 (https://github.com/powa-team/pg_stat_kcache/releases/tag/REL2_2_1).

RekGRpth commented 2 years ago

I got this error with master up to date branch

rjuju commented 2 years ago

I just tried with latest pg15 commit and latest pg_stat_kcache commit and it works:

=# select version();
                                                             version
---------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 15beta2@1201e0f038 [...]
(1 row)

=# show shared_preload_libraries ;
     shared_preload_libraries
-----------------------------------
 pg_stat_statements,pg_stat_kcache
(1 row)

Can you confirm the current commit you're using for pg_stat_kcache? If 1f9fb67813f608a31109b79aeb8d10c203f8ea7c is not included, you need to refresh your local repo. If it's, my best bet is that you have other extensions in your shared_preload_libraries with one of that that isn't compatible with pg15.

RekGRpth commented 2 years ago

you have other extensions in your shared_preload_libraries with one of that that isn't compatible with pg15

OK, thanks, I will find such extensions

RekGRpth commented 2 years ago

you have other extensions in your shared_preload_libraries with one of that that isn't compatible with pg15

OK, thanks, I will find such extensions

It was https://github.com/EnterpriseDB/pldebugger

rjuju commented 2 years ago

Ok, thanks for the confirmation!

I didn't know that pldebugger had to be in shared_preload_libraries, otherwise I would have fixed it when the new hook was added.

einisadog commented 4 months ago

this issue also solved my problem, thanks