Re: log_min_messages per backend type

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, japin <japinli(at)hotmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: log_min_messages per backend type
Date: 2026-07-20 13:55:38
Message-ID: CAHGQGwGK9UZMOC2RFQnQtGB33+-1t-jYo7pua4GdN4c75S_Y2Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 20, 2026 at 9:15 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> Hello,
>
> Here's a couple of trivial cleanups of this code. 0001 simplifies code
> and removes a duplicate by creating a small subroutine; 0002 also
> simplifies memory freeing a tad, by freeing allocations as soon as
> no longer needed instead of waiting and being forced to duplicate the
> frees in several places.

+ rawstring_len = strlen(rawstring);
+ guc_free(rawstring);

SplitGUCList() stores pointers into rawstring in elemlist, so
after guc_free(rawstring), the subsequent foreach over elemlist,etc
still seem to dereference freed memory. So rawstring should remain
alive until we're done using all the elements of elemlist?

BTW, with the patches, I saw the following initdb failure:

running bootstrap script ... LOG: invalid value for parameter
"log_min_messages": "warning"
DETAIL: Unrecognized log level: "".
FATAL: failed to initialize log_min_messages to "warning"
child process exited with exit code 1
initdb: removing data directory "data"

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2026-07-20 14:56:46 Re: Why clearing the VM doesn't require registering vm buffer in wal record
Previous Message Tomas Vondra 2026-07-20 13:53:05 Re: hashjoins vs. Bloom filters (yet again)