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

Monitoring fix pgbackrest #62

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkg/cluster/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,15 @@ const (
ALTER SCHEMA exporter OWNER TO cpo_exporter;
CREATE EXTENSION IF NOT EXISTS pgnodemx with SCHEMA exporter;
alter extension pgnodemx UPDATE;
CREATE TABLE IF NOT EXISTS exporter.pgbackrestbackupinfo (
CREATE TABLE IF NOT EXISTS exporter.pgbackrestbackupinfo (
data jsonb NOT NULL,
data_time timestamp with time zone DEFAULT now() NOT NULL
)
WITH (autovacuum_analyze_scale_factor='0', autovacuum_vacuum_scale_factor='0', autovacuum_vacuum_threshold='2', autovacuum_analyze_threshold='2');
ALTER TABLE exporter.pgbackrestbackupinfo OWNER TO cpo_exporter;

GRANT pg_execute_server_program TO cpo_exporter;

CREATE OR REPLACE FUNCTION exporter.update_pgbackrest_info()
RETURNS VOID AS $$
DECLARE
Expand Down Expand Up @@ -131,7 +133,6 @@ const (
);
END;
$$ LANGUAGE plpgsql;

`
)

Expand Down
Loading