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

Use different schema for pgstatsmon-specific functions and types #16

Open
kellymclaughlin opened this issue Jul 23, 2018 · 0 comments
Open

Comments

@kellymclaughlin
Copy link

This came up in the CR discussion for #14. Part of that change introduces a custom return type for a new function to collect vacuum progress information. Postgres does not currently support a CREATE TYPE IF NOT EXISTS statement so we must instead use DROP TYPE IF EXISTS ... CASCADE before the CREATE TYPE statement in pgstatsmon. This should be ok, but there is a risk that if some other part of the monitored system introduced an identically named type or function as one used by pgstatsmon then we could experience unexpected behavior or failures in either pgstatsmon or the monitored system. To avoid or at least limit this risk I suggest we explore moving the pgstatsmon-specific functions and types into a pgstatsmon schema namespace. It would require the queries using the functions to directly address the namespace rather than relying on the default public namespace, but I believe that should be a pretty minor change.

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