LP1492793: Support Application Name Postgres Option
authorJason Boyer <jboyer@library.in.gov>
Sun, 6 Sep 2015 16:58:49 +0000 (12:58 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 16 Feb 2016 20:38:01 +0000 (15:38 -0500)
commit1598c2b64036a1c6e1006fd15a0f83ee70971b36
tree750e8e56ca12ceb3018246ac0359924d64b2a097
parentc1b64bff4dcd59cc041eeb9227defbded5371bb7
LP1492793: Support Application Name Postgres Option

If app_settings/database/application_name is defined,
connections by that service will have the application_name
postgres option set, allowing log analyzers to associate
queries and services.

To test:

[1] Apply the patch and restart OpenSRF services.
[2] Query the pg_stat_activity table in the PostgreSQL
    database; the application_name column should now
    be populated with values like 'open-ils.cstore'
    or 'open-ils.storage' that indicate which Evergreen
    service holds the database connection.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/examples/opensrf.xml.example
Open-ILS/src/c-apps/oils_sql.c
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg.pm