[ruby-dbi-users] dbd_pg and deallocating prepared statements

KUBO Takehiro kubo at jiubao.org
Tue Aug 26 21:56:40 EDT 2008

Pardon me if I'm not correct. I have been interested in how various
DBMSs implement prepared statements. But I have not used postgresql
for 9 years.

dbd_pg uses prepared statements for all queries. But who deallocate the
prepared statements? "@stmt.clear if @stmt" doesn't do it.
IMO, if a ruby process uses one database session for all SQL statements
and issues them periodically, server side (postmaster) memory will be
increased as time goes.

See: http://www.postgresql.org/docs/8.3/static/libpq-exec.html#AEN30965

More information about the ruby-dbi-users mailing list