Re: Apache::DBI and DBD::Pg

From: Jeremy Nixon <jeremy(at)exit109(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: dbi-users(at)perl(dot)org,modperl(at)perl(dot)apache(dot)org
Subject: Re: Apache::DBI and DBD::Pg
Date: 2006-01-15 02:00:15
Message-ID: dqcabf$m6p$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tyler MacDonald <tyler(at)yi(dot)org> wrote:

> [Fri Jan 13 23:46:28 2006] [error] [client 192.168.99.112] DBD::Pg::db
> prepare_cached failed: FATAL: terminating connection due to administrator

Here's the thing: if your database connection goes away, and Apache::DBI
opens a new one, any prepared statement handles you might have become
invalid, because prepared statements are per-connection.

My way around it is to not use prepared statements. The only cases I have
where they would be of benefit would mean storing them across multiple
requests, and with Apache::DBI, you can't do that.

--
Jeremy | jeremy(at)exit109(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jonel Rienton 2006-01-15 09:10:57 Re: Moving PostgreSQL data directory on Windows
Previous Message Ottó Havasvölgyi 2006-01-15 01:45:51 Re: Moving PostgreSQL data directory on Windows