3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RDS for PostgreSQLでのログ出力について

Posted at

はじめに

ログ出力上、関係するパラメータグループの項目にlog_statementlog_min_duration_statementがあると思います。
この関連がいまいち理解できていなかったので、確認のためにまとめました。

早見表

log_statement log_min_duration_statement 出力内容
none - ログ出力なし
- -1以外の数値 指定された値を上回る実行時間を要したクエリ、および実行時間がログに出力
none -1以外の数値 log_min_duration_statementに有効な値を指定されている場合は、ログにクエリが出力
all -1以外の数値 log_statementが出力したクエリはlog_min_duration_statementの出力には含まれない

参考リンク

https://docs.aws.amazon.com/ja_jp/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.PostgreSQL.html

https://www.postgresql.jp/document/9.6/html/runtime-config-logging.html#guc-log-statement

https://www.postgresql.jp/document/9.6/html/runtime-config-logging.html#guc-log-min-duration-statement

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?