|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-03-03 01:18 UTC] iliaa@php.net
[2009-03-04 18:49 UTC] lukasz at fsi dot pl
[2009-03-04 18:51 UTC] lukasz at fsi dot pl
[2009-05-12 22:49 UTC] mbeccati@php.net
[2009-05-21 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 10:00:01 2025 UTC |
Description: ------------ Calling prepare() for pdo_pgsql connection consumes memory which is never being freed. Specified query doesn't matter. It seems that this happen because in my case pdo_pgsql does not use native prepared statements, but I can't find the reason for this. I think so because calling prepare("foo") does not cause an error as it does when I use pdo_mysql. Reproduce code: --------------- $a = new PDO('pgsql:'.$some_pdo_pgsql_dsn); for ($i = 0; $i < 1000000; $i++) { $st = $a->prepare(""); print(memory_get_usage(true)."\n"); unset($st); } Expected result: ---------------- constant memory usage Actual result: -------------- increasing memory usage