From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Euler Taveira <euler(at)eulerto(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Small memory fixes for pg_createsubcriber |
Date: | 2025-02-12 14:06:03 |
Message-ID: | CAEudQApo8Lk2FfaqNjxadovj_nAGoBjoF86+t7mG56hrYQSfbA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Em qua., 12 de fev. de 2025 às 00:54, Michael Paquier <michael(at)paquier(dot)xyz>
escreveu:
> On Tue, Feb 11, 2025 at 01:32:32PM -0300, Euler Taveira wrote:
> > There is no bug. They are the same behind the scenes. I'm fine changing
> it. It
> > is a new code and it wouldn't cause a lot of pain to backpatch patches
> in the
> > future.
>
> On consistency grounds, and as this is documented in fe-exec.c at the
> top of PQfreemem(), I can get behind the switch.
>
> > Even if the pg_createsubscriber aims to run in a small amount of time,
> hence,
> > it is fine to leak memory, the initial commit cleaned up all variables
> but a
> > subsequent commit 4867f8a555c apparently didn't. Although it is just a
> low
> > impact improvement, it is better to be strict and shut up SASTs.
>
> check_and_drop_existing_subscriptions() is called once per database in
> setup_subscriber(), and we are not going to have millions of them in
> this list. We don't usually care for such short-lived things, but as
> the original commit did the effort in d44032d01463, I don't see why we
> cannot do it here, either.
>
Thanks Michael.
best regards,
Ranier Vilela
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2025-02-12 14:34:24 | Re: Small memory fixes for pg_createsubcriber |
Previous Message | Dagfinn Ilmari Mannsåker | 2025-02-12 13:58:16 | Re: TAP test command_fails versus command_fails_like |