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

Using schema for placing pg_stat_statements and pg_stat_kcache #43

Open
shab2 opened this issue Apr 26, 2024 · 1 comment
Open

Using schema for placing pg_stat_statements and pg_stat_kcache #43

shab2 opened this issue Apr 26, 2024 · 1 comment
Assignees
Labels

Comments

@shab2
Copy link

shab2 commented Apr 26, 2024

Hello!
If I install extension pg_stat_statement into schema pgss, then I have error:

CREATE EXTENSION pg_stat_statements SCHEMA pgss;
CREATE EXTENSION pg_stat_kcache SCHEMA pgsk;
ERROR:  relation "pg_stat_statements" does not exist

But as you can see

show search_path;
                     search_path
-----------------------------------------------------
 "$user", public, pg_profile, pgsk, pgws, pgss, pgps

Is it possible to resolve it?

@rjuju rjuju self-assigned this Apr 26, 2024
@rjuju rjuju added the question label Apr 26, 2024
@rjuju
Copy link
Member

rjuju commented Apr 26, 2024

This is supposed to be working, and is working locally for me:

=# \dn
      List of schemas
  Name  |       Owner       
--------+-------------------
 public | pg_database_owner
(1 row)

=# create schema pgss; create schema pgsk;
CREATE SCHEMA
CREATE SCHEMA

=# set search_path to public, pgsk, pgss;
SET

=# create extension pg_stat_statements with schema pgss;
CREATE EXTENSION

=# create extension pg_stat_kcache with schema pgsk;
CREATE EXTENSION

I don't know what is different on your side.

What version of postgres are you using, and what version of pg_stat_kcache?

Maybe you can share a reproducer script that can be run an on empty database and lead to the error on your environment, that could help narrowing your issue.

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

No branches or pull requests

2 participants