On Mon, Jun 13, 2016 at 6:36 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Another problem, if the bloat is being driven by explicit PREPARE commands
> as you illustrate here, is that the backend doesn't get to silently
> discard prepared statements.
In the perl script he showed, the handle returned by $dbh->prepare is
not stored anywhere, so it should automatically get garbage collected
at the end of the Perl statement. The garbage collection should
trigger a destructor to send a "DEALLOCATE".
Cheers,
Jeff