Skip to content

Commit 91d773c

Browse files
ssiahetiongssiahetiong-exist
authored andcommitted
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 <[email protected]> Issue: #2244
1 parent 45886e8 commit 91d773c

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
@@ -226,7 +226,7 @@ else
226226
fi
227227
fi
228228

229-
sed -i "s/#PGBACKREST_INFO_THROTTLE_MINUTES#/${PGBACKREST_INFO_THROTTLE_MINUTES:-10}/g" /tmp/queries.yml
229+
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
230230

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

0 commit comments

Comments
 (0)