Re: Clean up hba.c of code freeing regexps

2023-04-17 Thread Michael Paquier
On Mon, Apr 17, 2023 at 02:21:41PM -0700, Nathan Bossart wrote: > AFAICT this is committed, but the commitfest entry [0] is still set to > "needs review." Can it be closed now? Yes, done. Thanks. -- Michael signature.asc Description: PGP signature

Re: Clean up hba.c of code freeing regexps

2023-04-17 Thread Nathan Bossart
On Fri, Apr 14, 2023 at 07:32:13AM +0900, Michael Paquier wrote: > On Thu, Apr 13, 2023 at 11:58:51AM +0200, Alvaro Herrera wrote: >> 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 freez

Re: Clean up hba.c of code freeing regexps

2023-04-13 Thread Michael Paquier
On Thu, Apr 13, 2023 at 11:58:51AM +0200, Alvaro Herrera wrote: > 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. Thanks, done that. The commit log mentions L

Re: Clean up hba.c of code freeing regexps

2023-04-13 Thread Alvaro Herrera
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

Re: Clean up hba.c of code freeing regexps

2023-04-12 Thread Drouvot, Bertrand
Hi, On 4/13/23 5:48 AM, Michael Paquier wrote: On Wed, Apr 12, 2023 at 10:25:42PM -0400, Tom Lane wrote: +1 for cleanup, if this is new code. It does us no good in the long run for v16 to handle this differently from both earlier and later versions. Okidoki. Let me know if anybody has an ob

Re: Clean up hba.c of code freeing regexps

2023-04-12 Thread Michael Paquier
On Wed, Apr 12, 2023 at 10:25:42PM -0400, Tom Lane wrote: > +1 for cleanup, if this is new code. It does us no good in the long > run for v16 to handle this differently from both earlier and later > versions. Okidoki. Let me know if anybody has an objection about what's been sent upthread. The

Re: Clean up hba.c of code freeing regexps

2023-04-12 Thread Tom Lane
Michael Paquier writes: > On Thu, Apr 13, 2023 at 12:53:51PM +1200, Thomas Munro wrote: >> and (2) I missed this when looking for manual memory >> management code that could be nuked, probably because it's hiding >> behind a few layers of functions call, but there are clearly comments >> that are

Re: Clean up hba.c of code freeing regexps

2023-04-12 Thread Michael Paquier
On Thu, Apr 13, 2023 at 12:53:51PM +1200, Thomas Munro wrote: > Up to the RMT of course, but it sounds a bit like (1) you potentially > had an open item already until last week (new code in 16 that could > leak regexes), Well, not really.. Note that HEAD does not leak regexes, because changes lik

Re: Clean up hba.c of code freeing regexps

2023-04-12 Thread Thomas Munro
On Thu, Apr 13, 2023 at 12:16 PM Michael Paquier wrote: > 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.

Clean up hba.c of code freeing regexps

2023-04-12 Thread Michael Paquier
Hi all, 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 supers