Skip to content

ERROR: pg_wait_sampling shared memory wasn't initialized yet #1

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

Closed
ghost opened this issue Oct 11, 2016 · 1 comment
Closed

ERROR: pg_wait_sampling shared memory wasn't initialized yet #1

ghost opened this issue Oct 11, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 11, 2016

postgres=# select * from pg_wait_sampling_profile;
ERROR: pg_wait_sampling shared memory wasn't initialized yet

You get this error, if you have not set the "shared_preload_libraries". To overcome the error, you need to set the "shared_preload_libraries" in postgresql.conf

shared_preload_libraries = '$libdir/pg_wait_sampling.so'

And restart the server.

Now you can overcome the error and see pg_wait_sampling is running...

postgres=# show shared_preload_libraries ;

shared_preload_libraries

$libdir/pg_wait_sampling.so
(1 row)

postgres=# select * from pg_wait_sampling_profile;
pid | event_type | event | count
-------+------------+-------+-------
50995 | | | 2452
50993 | | | 124
50977 | | | 4687
50978 | | | 4687
50976 | | | 4687
50980 | | | 4688
50975 | | | 4687
(7 rows)

However, the "shared_preload_libraries" information is missing the README documentation which is mandatory.

Regards
Raghav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant