Thread

Commits

  1. Fix small memory leaks in GUC checks

  2. Fix tiny memory leaks

  1. Fix tiny memory leaks

    Tofig Aliev <t.aliev@postgrespro.ru> — 2024-12-06T08:38:35Z

    Hi, hackers!
    
    There is a memory leak in functions check_application_name() and 
    check_cluster_name().
    Functions are located in src/backend/commands/variable.c
    
    The leak can be triggered using SQL command: SET 
    application_name=new_name;
    You can run pgbench with this command for a long time by passing this 
    command in file via '-f' flag.
    
    regards,
    Tofig
    
  2. Re: Fix tiny memory leaks

    Daniel Gustafsson <daniel@yesql.se> — 2024-12-06T08:49:24Z

    > On 6 Dec 2024, at 09:38, Tofig Aliev <t.aliev@postgrespro.ru> wrote:
    
    > There is a memory leak in functions check_application_name() and check_cluster_name().
    > Functions are located in src/backend/commands/variable.c
    
    LGTM.
    
    --
    Daniel Gustafsson
    
    
    
    
    
  3. Re: Fix tiny memory leaks

    Masahiko Sawada <sawada.mshk@gmail.com> — 2024-12-09T18:52:18Z

    On Fri, Dec 6, 2024 at 12:49 AM Daniel Gustafsson <daniel@yesql.se> wrote:
    >
    > > On 6 Dec 2024, at 09:38, Tofig Aliev <t.aliev@postgrespro.ru> wrote:
    >
    > > There is a memory leak in functions check_application_name() and check_cluster_name().
    > > Functions are located in src/backend/commands/variable.c
    >
    > LGTM.
    
    LGTM. It seems commit a9d58bfe8a3a missed to fix this memory leak.
    
    Regards,
    
    -- 
    Masahiko Sawada
    Amazon Web Services: https://aws.amazon.com
    
    
    
    
  4. Re: Fix tiny memory leaks

    Daniel Gustafsson <daniel@yesql.se> — 2024-12-09T19:03:09Z

    > On 9 Dec 2024, at 19:52, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
    > 
    > On Fri, Dec 6, 2024 at 12:49 AM Daniel Gustafsson <daniel@yesql.se> wrote:
    >> 
    >>> On 6 Dec 2024, at 09:38, Tofig Aliev <t.aliev@postgrespro.ru> wrote:
    >> 
    >>> There is a memory leak in functions check_application_name() and check_cluster_name().
    >>> Functions are located in src/backend/commands/variable.c
    >> 
    >> LGTM.
    > 
    > LGTM. It seems commit a9d58bfe8a3a missed to fix this memory leak.
    
    Yeah.  While fairly insignificant in nature, and there has been no complaints
    until now, I'm preparing a backpatch down to REL_15_STABLE to keep the code in
    sync for other backpatches to apply clean.
    
    --
    Daniel Gustafsson
    
    
    
    
    
  5. Re: Fix tiny memory leaks

    Daniel Gustafsson <daniel@yesql.se> — 2024-12-09T20:04:16Z

    > On 9 Dec 2024, at 20:03, Daniel Gustafsson <daniel@yesql.se> wrote:
    > 
    >> On 9 Dec 2024, at 19:52, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
    >> 
    >> On Fri, Dec 6, 2024 at 12:49 AM Daniel Gustafsson <daniel@yesql.se> wrote:
    >>> 
    >>>> On 6 Dec 2024, at 09:38, Tofig Aliev <t.aliev@postgrespro.ru> wrote:
    >>> 
    >>>> There is a memory leak in functions check_application_name() and check_cluster_name().
    >>>> Functions are located in src/backend/commands/variable.c
    >>> 
    >>> LGTM.
    >> 
    >> LGTM. It seems commit a9d58bfe8a3a missed to fix this memory leak.
    > 
    > Yeah.  While fairly insignificant in nature, and there has been no complaints
    > until now, I'm preparing a backpatch down to REL_15_STABLE to keep the code in
    > sync for other backpatches to apply clean.
    
    Done, but to 16 and not 15 which was a typo in the above email.
    
    --
    Daniel Gustafsson
    
    
    
    
    
  6. Re: Fix tiny memory leaks

    Masahiko Sawada <sawada.mshk@gmail.com> — 2024-12-09T22:10:46Z

    On Mon, Dec 9, 2024 at 12:04 PM Daniel Gustafsson <daniel@yesql.se> wrote:
    >
    > > On 9 Dec 2024, at 20:03, Daniel Gustafsson <daniel@yesql.se> wrote:
    > >
    > >> On 9 Dec 2024, at 19:52, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
    > >>
    > >> On Fri, Dec 6, 2024 at 12:49 AM Daniel Gustafsson <daniel@yesql.se> wrote:
    > >>>
    > >>>> On 6 Dec 2024, at 09:38, Tofig Aliev <t.aliev@postgrespro.ru> wrote:
    > >>>
    > >>>> There is a memory leak in functions check_application_name() and check_cluster_name().
    > >>>> Functions are located in src/backend/commands/variable.c
    > >>>
    > >>> LGTM.
    > >>
    > >> LGTM. It seems commit a9d58bfe8a3a missed to fix this memory leak.
    > >
    > > Yeah.  While fairly insignificant in nature, and there has been no complaints
    > > until now, I'm preparing a backpatch down to REL_15_STABLE to keep the code in
    > > sync for other backpatches to apply clean.
    >
    > Done, but to 16 and not 15 which was a typo in the above email.
    
    Thank you!
    
    Regards,
    
    -- 
    Masahiko Sawada
    Amazon Web Services: https://aws.amazon.com