Hi
I have setup pgAudit/pgAudit Analyzer onto our postgres server. After starting the pgAudit Anlyzer daemon, the postgres log files (and the csv files) are filling up continuously very fast (1mb/5secs)
I have found out its related to a parameter "log_duration = on" we have enabled in our postgresql.conf. We need this parameter on for our pgBadger process to log query data into the pgBadger reports.
As soon as we kill the pgAudit Analyzer daemon the entries stops in the files (both log/csv)
I have also verified by disabling the parameter to "log_duration = off" and the logs/csv files stops growing rapidly.
this is what I see in the csv files that is continuously logged when log_durarion = on when the pgAudit Analyzer daemon is running:
2017-06-26 10:25:00.081 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164481,"COMMIT",2017-06-26 10:23:24 ACST,5/0,0,LOG,00000,"duration: 0.484 ms",,,,,,,,,""
2017-06-26 10:25:00.081 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164482,"BEGIN",2017-06-26 10:23:24 ACST,5/49734,0,LOG,00000,"duration: 0.013 ms",,,,,,,,,""
2017-06-26 10:25:00.081 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164483,"BIND",2017-06-26 10:23:24 ACST,5/49734,0,LOG,00000,"duration: 0.023 ms",,,,,,,,,""
2017-06-26 10:25:00.081 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164484,"INSERT",2017-06-26 10:23:24 ACST,5/49734,368612248,LOG,00000,"duration: 0.077 ms",,,,,,,
,,""
2017-06-26 10:25:00.082 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164485,"COMMIT",2017-06-26 10:23:24 ACST,5/0,0,LOG,00000,"duration: 0.486 ms",,,,,,,,,""
2017-06-26 10:25:00.082 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164486,"BEGIN",2017-06-26 10:23:24 ACST,5/49735,0,LOG,00000,"duration: 0.014 ms",,,,,,,,,""
2017-06-26 10:25:00.082 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164487,"BIND",2017-06-26 10:23:24 ACST,5/49735,0,LOG,00000,"duration: 0.023 ms",,,,,,,,,""
2017-06-26 10:25:00.082 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164488,"INSERT",2017-06-26 10:23:24 ACST,5/49735,368612249,LOG,00000,"duration: 0.077 ms",,,,,,,
,,""
2017-06-26 10:25:00.083 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164489,"COMMIT",2017-06-26 10:23:24 ACST,5/0,0,LOG,00000,"duration: 0.482 ms",,,,,,,,,""
2017-06-26 10:25:00.083 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164490,"BEGIN",2017-06-26 10:23:24 ACST,5/49736,0,LOG,00000,"duration: 0.014 ms",,,,,,,,,""
2017-06-26 10:25:00.083 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164491,"BIND",2017-06-26 10:23:24 ACST,5/49736,0,LOG,00000,"duration: 0.023 ms",,,,,,,,,""
2017-06-26 10:25:00.083 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164492,"INSERT",2017-06-26 10:23:24 ACST,5/49736,368612250,LOG,00000,"duration: 0.077 ms",,,,,,,
,,""
2017-06-26 10:25:00.084 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164493,"COMMIT",2017-06-26 10:23:24 ACST,5/0,0,LOG,00000,"duration: 0.505 ms",,,,,,,,,""
2017-06-26 10:25:00.084 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164494,"BEGIN",2017-06-26 10:23:24 ACST,5/49737,0,LOG,00000,"duration: 0.014 ms",,,,,,,,,""
2017-06-26 10:25:00.084 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164495,"BIND",2017-06-26 10:23:24 ACST,5/49737,0,LOG,00000,"duration: 0.023 ms",,,,,,,,,""
2017-06-26 10:25:00.084 ACST,"postgres","postgres",21741,"[local]",59505b04.54ed,164496,"INSERT",2017-06-26 10:23:24 ACST,5/49737,368612251,LOG,00000,"duration: 0.076 ms",,,,,,,
,,""
this is what is in the log file:
2017-06-26 09:53:55 ACST [16083]: [49345-1] db=postgres,user=postgres app=[unknown],host=[local] LOG: duration: 0.491 ms
2017-06-26 09:53:55 ACST [16083]: [49346-1] db=postgres,user=postgres app=[unknown],host=[local] LOG: duration: 0.014 ms
2017-06-26 09:53:55 ACST [16083]: [49347-1] db=postgres,user=postgres app=[unknown],host=[local] LOG: duration: 0.024 ms
2017-06-26 09:53:55 ACST [16083]: [49348-1] db=postgres,user=postgres app=[unknown],host=[local] LOG: duration: 0.077 ms
2017-06-26 09:53:55 ACST [16083]: [49349-1] db=postgres,user=postgres app=[unknown],host=[local] LOG: duration: 0.463 ms
2017-06-26 09:53:55 ACST [16083]: [49350-1] db=postgres,user=postgres app=[unknown],host=[local] LOG: duration: 0.014 ms
2017-06-26 09:53:55 ACST [16083]: [49351-1] db=postgres,user=postgres app=[unknown],host=[local] LOG: duration: 0.024 ms
2017-06-26 09:53:55 ACST [16083]: [49352-1] db=postgres,user=postgres app=[unknown],host=[local] LOG: duration: 0.077 ms
2017-06-26 09:53:55 ACST [16083]: [49353-1] db=postgres,user=postgres app=[unknown],host=[local] LOG: duration: 0.486 ms
2017-06-26 09:53:55 ACST [16083]: [49354-1] db=postgres,user=postgres app=[unknown],host=[local] LOG: duration: 0.014 ms
thanks for your help.
Regards
Dylan