Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 未完全解析AWS RDS日志中的PgBadger报告_Postgresql_Aws Rds_Pgbadger - Fatal编程技术网

Postgresql 未完全解析AWS RDS日志中的PgBadger报告

Postgresql 未完全解析AWS RDS日志中的PgBadger报告,postgresql,aws-rds,pgbadger,Postgresql,Aws Rds,Pgbadger,我使用pgbadger如下: pgbadger -p %t:%r:%u@%d:[%p]: postgresql.log 日志\行\前缀是为RDS设置的,不能更改。它与我传递给pgbadger相同(%t:%r:%u@%d:[%p]:) 当我启动pgbadger时,我得到以下标准输出 [=======================> ] Parsed 52063631 bytes of 52063634 (100.00%), queries: 66116, events: 0 LOG: O

我使用pgbadger如下:

pgbadger -p %t:%r:%u@%d:[%p]: postgresql.log
日志\行\前缀是为RDS设置的,不能更改。它与我传递给pgbadger相同(%t:%r:%u@%d:[%p]:)

当我启动pgbadger时,我得到以下标准输出

[=======================> ] Parsed 52063631 bytes of 52063634 (100.00%), queries: 66116, events: 0
LOG: Ok, generating html report...
所以它解析了查询,并输出了我看到的大部分统计数据。但在顶部我看到了错误的信息。耗时的查询和最慢的单个查询表示“无数据集”。在最频繁的查询(N)中,所有查询的持续时间都为0。请参见此处的屏幕截图:。查询示例根本不显示任何示例。 我检查了postgresql日志,持续时间在那里。例如:

2016-04-13 22:00:02 UTC:blabla.com(43372):blabla@blabla:[20584]:LOG:  statement: SELECT DISTINCT "reports2_report"."id", "reports2_report"."created", "reports2_report"."modified", "reports2_report"."data", "reports2_report"."person_info", "reports2_report"."status", "reports2_report"."source_profile_id", "reports2_report"."application_id", "reports2_report"."error_detail" FROM "reports2_report" INNER JOIN "reports2_reportsourceprofile" ON ( "reports2_report"."source_profile_id" = "reports2_reportsourceprofile"."id" ) INNER JOIN "reports2_reportsource" ON ( "reports2_reportsourceprofile"."report_source_id" = "reports2_reportsource"."id" ) INNER JOIN "applications_applicationdocument" ON ( "reports2_report"."application_id" = "applications_applicationdocument"."slug" ) WHERE ("reports2_reportsource"."identifier" = 'redridge_credit' AND "reports2_report"."application_id" = 'jqLoMe' AND ("reports2_report"."application_id" IN (SELECT DISTINCT V0."slug" FROM "applications_applicationdocument" V0 LEFT OUTER JOIN "auth_user" V1 ON ( V0."seller_id" = V1."id" ) LEFT OUTER JOIN "accounts_companymembership" V2 ON ( V1."id" = V2."user_id" ) LEFT OUTER JOIN "applications_applicationbundle" V5 ON ( V0."bundle_id" = V5."id" ) LEFT OUTER JOIN "applications_applicationbundle_sharees" V6 ON ( V5."id" = V6."applicationbundle_id" ) WHERE (V2."company_id" IN (SELECT U0."id" FROM "accounts_company" U0 WHERE (U0."lft" > 2 AND U0."tree_id" = 6 AND U0."rght" < 3)) OR V0."applicant_id" = 111827 OR V0."seller_id" = 111827 OR V6."user_id" = 111827)) OR "applications_applicationdocument"."seller_id" = 111827 OR "applications_applicationdocument"."applicant_id" = 111827 OR "reports2_reportsourceprofile"."user_id" = 111827)) ORDER BY "reports2_report"."created" DESC LIMIT 20
2016-04-13 22:00:02 UTC:blabla.com(43372):blabla@blabla:[20584]:LOG:  duration: 517.047 ms
2016-04-13 22:00:02 UTC:blabla.com(43372):blabla@blabla:[20584]:日志:语句:选择不同的“reports2\u report”。“id”,“reports2\u report”。“created”,“reports2\u report”。“modified”,“reports2\u report”。“data”,“reports2\u report”。“person\u info”,“reports2\u report”。“status”,“reports2\u report”。“source\u profile\u id”,“reports2\u report”。“application\u id”,“reports2\u report”“error\u detail”来自(“reports2\u report”内部联接“reports2\u reportsourceprofile”上的“reports2\u reportsourceprofile”“source id”“reports2\u reportsourceprofile”“id”)内部联接“reports2\u reportsourceprofile”“report\u source id”“reports2\u reportsource”“id”“内部联接”应用程序应用程序文档上的“reports2\u reportsourceprofile”“内部联接”“ON”(“reports2_report”。“application_id”=“applications_applicationdocument”。“slug”)其中(“reports2_reportsource”。“identifier”=“redridge_credit”和“reports2_report”。“application_id”=“jqLoMe”和(“reports2_report”。“application_id”在(从“applications_applications_applicationdocument”V0中选择不同的V0.“slug”左外连接到V1上的“auth_user”)(V0.“卖方id”=V1.“id”)左侧外部连接“账户公司成员”V2 ON(V1.“id”=V2.“用户id”)左侧外部连接“应用程序应用程序捆绑包”V5 ON(V0.“捆绑包id”=V5.“id”)左侧外部连接“应用程序应用程序捆绑包共享”V6 ON(V5.“id”=V6.“应用程序捆绑包id”)其中(V2.“公司id”IN(从“账户-公司”U0,其中(U0.“lft”>2和U0.“树id”=6和U0.“rght”<3)或V0.“申请人id”=111827或V0.“卖方id”=111827或V6.“用户id”=111827)或“申请文件”。“卖方id”=111827或“申请文件”。“申请人id”=111827或“报告来源档案”。“用户id”=111827)按“报告2_报告”排序。“已创建”描述限制20
2016-04-13 22:00:02 UTC:blabla.com(43372):blabla@blabla:[20584]:日志:持续时间:517.047毫秒

如何让PgBadger生成完整正确的报告?

这是由于log\u statement=all而不是log\u statement=none。log\u min\u duration\u statement只有在log\u statement=none时才起作用