Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1202509 - Allow enabling of execution statistics in postgresql cartridge
Allow enabling of execution statistics in postgresql cartridge
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
2.2.0
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Jason DeTiberus
libra bugs
: NeedsTestCase
Depends On: 1185031
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-16 14:54 EDT by Brenton Leanhardt
Modified: 2015-04-06 13:06 EDT (History)
13 users (show)

See Also:
Fixed In Version: openshift-origin-cartridge-postgresql-1.32.4.1-1.el6op
Doc Type: Enhancement
Doc Text:
This enhancement adds the OPENSHIFT_POSTGRESQL_CONFIG environment variable for the PostgreSQL cartridge, which allows developers to specify additional configuration lines for inclusion in the postgresql.conf file. For example, developers can now use this environment variable to enable execution statistics: # rhc set-env OPENSHIFT_POSTGRESQL_CONFIG="shared_preload_libraries = 'pg_stat_statements';pg_stat_statements.track = all" Note the required ";" separating each setting when listing multiple configuration lines. After applying this update, a cartridge upgrade is required. If enabling execution statistics, developers must also restart their application after setting OPENSHIFT_POSTGRESQL_CONFIG.
Story Points: ---
Clone Of: 1185031
Environment:
Last Closed: 2015-04-06 13:06:44 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0779 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.5 bug fix and enhancement update 2015-04-06 17:05:45 EDT

  None (edit)
Comment 3 Gaoyun Pei 2015-03-17 03:15:43 EDT
Verify this bug with openshift-origin-cartridge-postgresql-1.32.4.1-1.el6op

1. Create an app with postgresql-9.2 embedded.

2. Set the OPENSHIFT_POSTGRESQL_CONFIG variable with below value:
rhc set-env OPENSHIFT_POSTGRESQL_CONFIG="shared_preload_libraries = 'pg_stat_statements';pg_stat_statements.track = all" -a test1

3. Restart the app

4. Checked the environement variable has changed
[test1-123.ose22-manual.com.cn 123-test1-1]\> printenv OPENSHIFT_POSTGRESQL_CONFIG
shared_preload_libraries = 'pg_stat_statements';pg_stat_statements.track = all

5. Ran command requested in psql
test1=# \i /usr/share/pgsql/contrib/pg_stat_statements.sql
SET
CREATE FUNCTION
CREATE FUNCTION
CREATE VIEW
GRANT
REVOKE
test1=# select * from pg_stat_statements;
 userid | dbid  |                                 query                      
           | calls | total_time | rows 
--------+-------+------------------------------------------------------------
-----------+-------+------------+------
     10 | 12923 | SELECT d.datname as "Name",                                
          +|     1 |      0.439 |    4
        |       |        pg_catalog.pg_get_userbyid(d.datdba) as "Owner",    
          +|       |            | 
        |       |        pg_catalog.pg_encoding_to_char(d.encoding) as "Encod
ing",     +|       |            | 
        |       |        d.datcollate as "Collate",                          
          +|       |            | 
        |       |        d.datctype as "Ctype",                              
          +|       |            | 
        |       |        pg_catalog.array_to_string(d.datacl, ?) AS "Access p
rivileges"+|       |            | 
        |       | FROM pg_catalog.pg_database d                              
          +|       |            | 
        |       | ORDER BY 1;                                                
           |       |            | 
(1 row)
Comment 5 errata-xmlrpc 2015-04-06 13:06:44 EDT
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/RHBA-2015-0779.html

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