1

Currently on one of our dev servers we log everything what happend in database, but lots of traffic in is generated by patroni cluster and is not needed in further investigation. Is possibile to exclude application from postgres logs?

Something like "log from every application except 'patroni' and 'postgres'".

application_name="all -postgres -patroni"

Yes, i know, i can filter it later, but will be nice if this can be done before write anything to disk.

1 Answer 1

0

It is easy to do this by user, but not by application name. Does/can patroni log in as it's own user?

alter user patroni set log_statement to none
3
  • Good hint, patroni uses user postgres, but it also can be omitted.
    – parasit
    Feb 8, 2018 at 14:29
  • 1
    Unfortunately, it does not work, I still have logs full of information from the user postgres. :/
    – parasit
    Feb 20, 2018 at 13:31
  • Works for me. Maybe patroni turns it back on after completing the log on?
    – jjanes
    Feb 21, 2018 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.