[rt-users] Prepared statement already exists...

Matthias Leisi matthias at leisi.net
Thu Feb 2 03:15:21 EST 2012


(I just realized that I originally sent my response to Ruslan only. My bad.)

On Wed, Feb 1, 2012 at 8:25 PM, Ruslan Zakirov <ruz at bestpractical.com> wrote:

>
> From what you have posted I suspect that problem is in DBI/DBD::Pg
> modules. When you check version of the modules, double check with RT's
> UI to make sure what you get in command line interface matches what RT


Admin/Tools/Configuration.html says:

| DB     1.26
| DBD::Pg        2.18.1
/usr/lib/perl5/site_perl/5.12.1/x86_64-linux-thread-multi/DBD/Pg.pm
| DBD::Sponge    12.010002
/usr/lib/perl5/vendor_perl/5.12.1/x86_64-linux-thread-multi/DBD/Sponge.pm
| DBI    1.609
/usr/lib/perl5/vendor_perl/5.12.1/x86_64-linux-thread-multi/DBI.pm

> loads. Try downgrading DBD::Pg.

I'm a bit uneasy about messing around with Perl modules, so I'll try
the next one first:

> As workaround you can try to disable server side preparing of statements:
>
> http://search.cpan.org/~turnstep/DBD-Pg-2.18.1/Pg.pm#pg_server_prepare_(integer)

Is there a safe way to add that option within RT? I see that
lib/RT/Handle.pm has sub Connect which get's passed %args which
supposedly is prepared in sub BuildDSN in the same file? Is there a
conceptually better alternative to this:

(in sub BuildDSN, after %args has been set):

   if ( $db_type eq 'Pg' ) {
       $args{'pg_server_prepare' = 1;
   }

-- Matthias



More information about the rt-users mailing list