Bug 1313317 - [Improvement] postgres logfiles to have timestamps
[Improvement] postgres logfiles to have timestamps
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer (Show other bugs)
6.1.6
All Linux
medium Severity medium (vote)
: Unspecified
: --
Assigned To: Chris Roberts
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-01 06:38 EST by Pavel Moravec
Modified: 2016-09-07 11:33 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-07 11:33:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pavel Moravec 2016-03-01 06:38:41 EST
Description of problem:
It would be great if psql logfiles under /var/lib/pgsql/data/pg_log/ directory have timestamps. Since without that, it is hard to correlate an event / error in psql with other logs.

See:

http://www.postgresql.org/docs/9.0/static/runtime-config-logging.html#GUC-LOG-LINE-PREFIX

how to achieve that.


Version-Release number of selected component (if applicable):
Sat6.1.7


How reproducible:
100%


Steps to Reproduce:
1. Install and start Sat6, do whatever you want
2. check logs in /var/lib/pgsql/data/pg_log/ dir


Actual results:
The logs are without timestamp.


Expected results:
The logs to be with timestamp.


Additional info:
Comment 2 Bryan Kearney 2016-07-26 11:25:24 EDT
Moving 6.2 bugs out to sat-backlog.
Comment 3 Bryan Kearney 2016-07-26 11:34:39 EDT
Moving 6.2 bugs out to sat-backlog.
Comment 5 Pavel Moravec 2016-08-05 02:21:49 EDT
This seems to be fixed due to some side-effect bugfix/improvement. Since I see:

# head /var/lib/pgsql/data/pg_log/postgresql-Thu.log -n2
2016-08-04 13:37:36 CEST ERROR:  duplicate key value violates unique constraint "dynflow_coordinator_records_pkey"
2016-08-04 13:37:36 CEST DETAIL:  Key (id, class)=(delayed-executor, Dynflow::Coordinator::DelayedExecutorLock) already exists.
#

and:

# grep -r log_line_prefix /usr/share/foreman-installer/
/usr/share/foreman-installer/modules/postgresql/manifests/globals.pp:  $log_line_prefix          = undef,
/usr/share/foreman-installer/modules/postgresql/manifests/params.pp:  $log_line_prefix            = '%t '
/usr/share/foreman-installer/modules/postgresql/manifests/server/config.pp:  $log_line_prefix            = $postgresql::server::log_line_prefix
/usr/share/foreman-installer/modules/postgresql/manifests/server/config.pp:  if $log_line_prefix {
/usr/share/foreman-installer/modules/postgresql/manifests/server/config.pp:    postgresql::server::config_entry {'log_line_prefix':
/usr/share/foreman-installer/modules/postgresql/manifests/server/config.pp:      value => $log_line_prefix,
/usr/share/foreman-installer/modules/postgresql/manifests/server.pp:  $log_line_prefix            = $postgresql::params::log_line_prefix,
#

So from my point of view, the BZ can be closed as fixed in 6.2.

Do you agree, Chris/Toledo?
Comment 6 Chris Roberts 2016-09-07 11:33:18 EDT
Hi Pavel,

I agree with the fix in 6.2 I will close this one.

pmoravec++

- Chris Roberts

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