From 49829f8935fde33cfa43cd673632d046ec939e58 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 7 May 2014 16:19:22 +0200 Subject: [PATCH] Set default PostgreSQL application name to "cartodb_tiler" --- NEWS.md | 4 ++++ lib/cartodb/cartodb_windshaft.js | 3 +++ run_tests.sh | 2 ++ 3 files changed, 9 insertions(+) diff --git a/NEWS.md b/NEWS.md index cf384bed..7738547f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,10 @@ New features: - Add support for log_filename directive - Reopen log file on SIGHUP, for better logrotate integration +Enhancements: + + - Set default PostgreSQL application name to "cartodb_tiler" + 1.10.2 -- 2014-04-08 -------------------- diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index 23878a7f..291dff26 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -11,6 +11,9 @@ var _ = require('underscore') , os = require('os') ; +if ( ! process.env['PGAPPNAME'] ) + process.env['PGAPPNAME']='cartodb_tiler'; + var CartodbWindshaft = function(serverOptions) { var debug = global.environment.debug; diff --git a/run_tests.sh b/run_tests.sh index 888060d5..9790b7e6 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -5,6 +5,8 @@ OPT_CREATE_PGSQL=yes # create the PostgreSQL test environment OPT_DROP_REDIS=yes # drop the redis test environment OPT_DROP_PGSQL=yes # drop the PostgreSQL test environment +export PGAPPNAME=cartodb_tiler_tester + cd $(dirname $0) BASEDIR=$(pwd) cd -