Thread: [BUGS] Bug in postgres log file

[BUGS] Bug in postgres log file

From
"Bogdan Bykhovets - ControlPay"
Date:

Hello,

 

please help us.

 

Postgres writes in to the log file the same date and time(server starts date and time) for all checkpoint operations. For other operations for example long queries or errors postgres writes in to the log current date and time.

 

> select version();

PostgreSQL 9.6.0 on x86_64-suse-linux-gnu, compiled by gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973], 64-bit

 

In attachment you can find:

 

log file example

postgres.conf

 

Bogdan Bykhovets

DevOps Engineer 
b.bykhovets@controlpay.com


ControlPay — The global Freight Audit company 

Mobile: +380 63 8636363

Office: +380 44 585 5935; +380 44 585 5936 

 



Visit us at:
 www.controlpay.com
LinkedIn:
 ControlPay-BV
Twitter:
 @ControlPay

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
ControlPay is neither liable for the proper and complete transmission of the information contained in this communication nor for delay in its receipt. ControlPay does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference.

 

-- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs

Re: [BUGS] Bug in postgres log file

From
bricklen
Date:
On Thu, Feb 2, 2017 at 1:14 AM, Bogdan Bykhovets - ControlPay <b.bykhovets@controlpay.com> wrote:
 

Postgres writes in to the log file the same date and time(server starts date and time) for all checkpoint operations. For other operations for example long queries or errors postgres writes in to the log current date and time.

 

> select version();

PostgreSQL 9.6.0 on x86_64-suse-linux-gnu, compiled by gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973], 64-bit



Try changing your log_line_prefix to
log_line_prefix = '%p %u %m %e %i'
and reloading your postgresql.conf files (eg. pg_ctl reload)
I suspect the "%s" session timestamp is the problem, and you might be looking for the wall clock time instead (which is logged via "%m")