Skip to content

Commit d229f89

Browse files
Replace PG_STAT_STATEMENTS_LIMIT on exporter startup
The new variable was added for the `pg_stat_statements` support. This sets the default to be "20" statements, which is what is used by pgMonitor. Co-authored-by: Steven Siahetiong <ssiahetiong@exist.com> Issue: CrunchyData#2244
1 parent 775fd1e commit d229f89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/crunchy-postgres-exporter/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ else
214214
fi
215215
fi
216216

217-
sed -i "s/#PGBACKREST_INFO_THROTTLE_MINUTES#/${PGBACKREST_INFO_THROTTLE_MINUTES:-10}/g" /tmp/queries.yml
217+
sed -i -e "s/#PGBACKREST_INFO_THROTTLE_MINUTES#/${PGBACKREST_INFO_THROTTLE_MINUTES:-10}/g" -e "s/#PG_STAT_STATEMENTS_LIMIT#/${PG_STAT_STATEMENTS_LIMIT:-20}/g" /tmp/queries.yml
218218

219219
PG_OPTIONS="--extend.query-path=${QUERY_DIR?}/queries.yml --web.listen-address=:${POSTGRES_EXPORTER_PORT}"
220220

0 commit comments

Comments
 (0)