Skip to content

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

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions