Skip to content

Commit

Permalink
Update pg_stat_monitor and pgAudit extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
inelpandzic committed Jan 2, 2025
1 parent 78c3d22 commit 773532a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/pgaudit/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func EnableInPostgreSQL(ctx context.Context, exec postgres.Executor) error {
// Quiet the NOTICE from IF EXISTS, and install the pgAudit event triggers.
// - https://www.postgresql.org/docs/current/runtime-config-client.html
// - https://github.com/pgaudit/pgaudit#settings
`SET client_min_messages = WARNING; CREATE EXTENSION IF NOT EXISTS pgaudit;`,
`SET client_min_messages = WARNING; CREATE EXTENSION IF NOT EXISTS pgaudit; ALTER EXTENSION pgaudit UPDATE;`,
map[string]string{
"ON_ERROR_STOP": "on", // Abort when any one command fails.
"QUIET": "on", // Do not print successful commands to stdout.
Expand Down
2 changes: 1 addition & 1 deletion internal/pgstatmonitor/pgstatmonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func EnableInPostgreSQL(ctx context.Context, exec postgres.Executor) error {
log := logging.FromContext(ctx)

stdout, stderr, err := exec.ExecInAllDatabases(ctx,
`SET client_min_messages = WARNING; CREATE EXTENSION IF NOT EXISTS pg_stat_monitor;`,
`SET client_min_messages = WARNING; CREATE EXTENSION IF NOT EXISTS pg_stat_monitor; ALTER EXTENSION pg_stat_monitor UPDATE;`,
map[string]string{
"ON_ERROR_STOP": "on", // Abort when any one command fails.
"QUIET": "on", // Do not print successful commands to stdout.
Expand Down

0 comments on commit 773532a

Please sign in to comment.