| From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | psql memory leaks |
| Date: | 2023-02-21 02:55:55 |
| Message-ID: | 20230221.115555.89096938631423206.horikyota.ntt@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I noticed that \bind is leaking memory for each option.
=# SELECT $1, $2, $3 \ bind 1 2 3 \g
The leaked memory blocks are comming from
psql_scan_slash_option(). The attached small patch resolves that
issue. I looked through the function's call sites, but I didn't find
the same mistake.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Fix-memory-leak-of-psql-s-bind.patch | text/x-patch | 997 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kyotaro Horiguchi | 2023-02-21 02:58:39 | Re: Add WAL read stats to pg_stat_wal |
| Previous Message | Kyotaro Horiguchi | 2023-02-21 02:14:57 | Re: psql \watch 2nd argument: iteration count |