Using pgbadger with AWS RDS

There’s two non-obvious things to know when starting to use pgbadger with AWS RDS.

First, set:

log_statement = None 

Don’t set this to all as the AWS docs suggest.

Further, don’t waste your time trying to add a DB parameter to set log_line_prefix to pgbadger’s recommended value: it’s not possible1. Instead tell pgbadger about the log format that RDS insists on:

$ pgbadger -p '%t:%r:%u@%d:[%p]:' postgres.log

Hope that saves you some time.

----

Something wrong? Suggest an improvement or add a comment (see article history)
Tagged with: AWS, postgres
Filed in: tips

Previous: A mnemonic for mock decorators

Copyright © 2005-2017 David Winterbottom
Content licensed under CC BY-NC-SA 4.0.