Re: Clean up hba.c of code freeing regexps

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Clean up hba.c of code freeing regexps
Date: 2023-04-13 09:58:51
Message-ID: 20230413095851.dflq5w3bss2gyus6@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2023-Apr-13, Michael Paquier wrote:

> With db4f21e in place, there is no need to worry about explicitely
> freeing any regular expressions that may have been compiled when
> loading HBA or ident files because MemoryContextDelete() would be
> able to take care of that now that these are palloc'd (the definitions
> in regcustom.h superseed the ones of regguts.h).

Hmm, nice.

> The logic in hba.c that scans all the HBA and ident lines to any
> regexps can be simplified a lot. Most of this code is new in 16~, so
> I think that it is worth cleaning up this stuff now rather than wait
> for 17 to open for business. Still, this is optional, and I don't
> mind waiting for 17 if the regexp/palloc business proves to be an
> issue during beta.

I agree with the downthread votes to clean this up now rather than
waiting. Also, you're adding exactly zero lines of new code, so I don't
think feature freeze affects the decision.

Álvaro Herrera Breisgau, Deutschland —
"Once again, thank you and all of the developers for your hard work on
PostgreSQL. This is by far the most pleasant management experience of
any database I've worked on." (Dan Harris)

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2023-04-13 10:04:19 Re: pg_upgrade and logical replication
Previous Message Peter Smith 2023-04-13 09:52:33 Re: [PoC] pg_upgrade: allow to upgrade publisher node