Bug #76616 [Opn->Nab]: PHP max memory limit not respected on pdo_pgsql
| From: | krakjoe@php.net | Date: | Thu, 28 Feb 2019 19:08:51 +0000 |
| Subject: | Bug #76616 [Opn->Nab]: PHP max memory limit not respected on pdo_pgsql | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219772@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76616&edit=1
ID: 76616
Updated by: krakjoe@php.net
Reported by: matttah at gmail dot com
Summary: PHP max memory limit not respected on pdo_pgsql
-Status: Open
+Status: Not a bug
Type: Bug
Package: PDO PgSQL
Operating System: Ubuntu 16
PHP Version: 7.1.19
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2019-02-28 18:57:13] kontakt at beberlei dot de
I can understand your frustration with this, but it is not actually fixable unless there will be a
complete implementation of the pgsql C client library using PHP/Zend APIs. This is what MySQL has
with mysqlnd, as such this cannot happen with MySQL.
But Postgresql client library doesn't use PHPs memory management and goes around the memory
limit for this reason.
As you can read here somebody requested the feature for libpq to replace the memory allocator, but
nothing much has happened: https://www.postgresql.org/message-id/20170828172834.GA71455%40TC.local
------------------------------------------------------------------------
[2018-07-12 12:01:32] matttah at gmail dot com
Description:
------------
If using the PDO driver with the pgsql driver it appears that the ini max memory limits are NOT
obeyed while the driver fetches the results. This allows for a large query (ie select * from table)
to go well above the memory limits that the php.ini specifies.
Expected result:
----------------
I would expect the PHP.ini memory limits to cause an out of memory limit/kill it if the amount of
allocated space on the driver exceeds the configured memory limit.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76616&edit=1