Bug 1152698 - PostGresSQL Logging datetime
Summary: PostGresSQL Logging datetime
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1150736
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-14 18:19 UTC by Jason DeTiberus
Modified: 2014-11-03 19:55 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1150736
Environment:
Last Closed: 2014-11-03 19:55:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:1796 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Enterprise 2.2 Release Advisory 2014-11-04 00:52:02 UTC

Description Jason DeTiberus 2014-10-14 18:19:47 UTC
+++ This bug was initially created as a clone of Bug #1150736 +++

Description of problem:
Date / Time not in postgresql.log file in /log folder

Version-Release number of selected component (if applicable):
9.x

How reproducible:
Add postgres, start it up, you won't have date / time in log file.

Steps to Reproduce:
1. Created Postgres SQL 9.x cartridge
2.  Start DB
3. Check log file.

Actual results:
No dates on log lines

Expected results:
Date / Time on each line

Additional info:

I don't mind having to modify the .CONF file for postgres, but people are saying not to do that.

--- Additional comment from Michal Fojtik on 2014-10-09 08:23:04 EDT ---

John, thanks for reporting this. I created a PR to add timestamp into postgresql logs:

https://github.com/openshift/origin-server/pull/5862

--- Additional comment from openshift-github-bot on 2014-10-09 15:48:27 EDT ---

Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/4b1a464a0e748693f5168ecf37296059092b7e72
Bug 1150736 - Add timestamp to postgresql logs

--- Additional comment from John M on 2014-10-09 17:19:59 EDT ---

Michal,

You guys totally rock!  this will really help me.

Ultimately, is there a way to modify the .conf file by hand just in case?  Or does it get generated each time Postgresql is started?

Thanks again for such a quick turnaround.

--- Additional comment from Wenjing Zheng on 2014-10-09 22:50:54 EDT ---

Verified on devenv_5222, the date/time displays in postgresql.log:
[wzheng@rh6-openshift apps]$ rhc tail php
==> app-root/logs/postgresql.log <==
2014-10-10 06:36:03 GMT LOG:  could not bind socket for statistics collector: Permission denied
2014-10-10 06:36:03 GMT LOG:  disabling statistics collector for lack of working socket
2014-10-10 06:36:03 GMT WARNING:  autovacuum not started because of misconfiguration
2014-10-10 06:36:03 GMT HINT:  Enable the "track_counts" option.
2014-10-10 06:36:03 GMT LOG:  database system was shut down at 2013-05-21 05:07:11 GMT
2014-10-10 06:36:03 GMT LOG:  database system is ready to accept connections

If there will be more fix based on John's comments, I will verify again. For now, mark this bug verified as it has made data/time displayed in postgresql.log.

Comment 1 Yanping Zhang 2014-10-16 07:30:00 UTC
Verified on ose 2.2/2014-10-15.1.
Steps to verify:
1.Create app with postgresql-9.2
#rhc app create ruby1 ruby-1.9 postgresql-9.2
2.Check the db log.
#rhc tail ruby1
Actual results:
2.Have date and time info in db log:
#rhc tail ruby1
==> app-root/logs/postgresql.log <==
2014-10-16 07:25:01 GMT LOG:  database system was shut down at 2013-05-21 05:07:11 GMT
2014-10-16 07:25:01 GMT LOG:  database system is ready to accept connections
2014-10-16 07:25:01 GMT LOG:  autovacuum launcher started

Comment 3 errata-xmlrpc 2014-11-03 19:55:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2014-1796.html


Note You need to log in before you can comment on or make changes to this bug.