创建postgres rds时如何设置log_line_prefix的值

How can I set the value of log_line_prefix while creating postgres rds

我正在通过 CFT 在 aws 云中创建一个 postgres 数据库。我想在 postgres.conf 中设置 log_line_prefix 值 file.I 无法通过将其添加到数据库参数 group.Is 来设置这些值 还有其他方法可以设置吗?

log_line_prefix 在 RDS 中不受支持,这是官方文档中提到的解决方法。

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.Badger

您可以使用pgbadger 等日志分析器来分析PostgreSQL 日志。 pgbadger 文档指出 %l 模式(session/process 的日志行)应该是前缀的一部分。但是,如果您将当前的 rds log_line_prefix 作为参数提供给 pgbadger,它仍应生成报告。