You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Siddharth Wagle (JIRA)" <ji...@apache.org> on 2017/06/02 17:49:04 UTC
[jira] [Comment Edited] (AMBARI-21000) Ambari does not work with
PGBouncer/PostgreSQL
[ https://issues.apache.org/jira/browse/AMBARI-21000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035122#comment-16035122 ]
Siddharth Wagle edited comment on AMBARI-21000 at 6/2/17 5:48 PM:
------------------------------------------------------------------
{code}
commit 4283211592c6813e02d74b7ef801da39711042cb
Author: Siddharth Wagle <sw...@hortonworks.com>
Date: Fri Jun 2 10:47:09 2017 -0700
AMBARI-21000. Ambari does not work with PGBouncer/PostgreSQL. (Robert Yokota via swagle)
{code}
was (Author: swagle):
commit 4283211592c6813e02d74b7ef801da39711042cb
Author: Siddharth Wagle <sw...@hortonworks.com>
Date: Fri Jun 2 10:47:09 2017 -0700
AMBARI-21000. Ambari does not work with PGBouncer/PostgreSQL. (Robert Yokota via swagle)
> Ambari does not work with PGBouncer/PostgreSQL
> ----------------------------------------------
>
> Key: AMBARI-21000
> URL: https://issues.apache.org/jira/browse/AMBARI-21000
> Project: Ambari
> Issue Type: Bug
> Affects Versions: 2.5.2
> Reporter: Robert Yokota
> Fix For: 2.5.2
>
> Attachments: AMBARI-21000.01.patch
>
>
> When using JDBC with PGBouncer (a connection pooler for PostgreSQL), prepared statements must be disabled on the client side. According to the PgBouncer FAQ, this is done by passing "prepareThreshold=0" in the JDBC URL. Even when using "prepareThreshold=0", Ambari returns errors of the form "prepared statement "S_1" does not exist". This is because Ambari uses Quartz, which uses C3P0. Quartz by default configures C3P0 to cache prepared statements by setting maxStatementsPerConnection=120. Fortunately, Quartz also allows you to override this C3P0 setting by passing a property named "maxCachedStatementsPerConnection". When setting this property to 0 (which is the default in C3P0), then Ambari works properly with PGBouncer.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)