Re: Improve the log message output of basic_archive when basic_archive.archive_directory parameter is not set - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Improve the log message output of basic_archive when basic_archive.archive_directory parameter is not set
Date
Msg-id 7035FAFE-7E91-4B31-AA72-75EE82DB3F7B@yesql.se
Whole thread Raw
In response to Re: Improve the log message output of basic_archive when basic_archive.archive_directory parameter is not set  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Improve the log message output of basic_archive when basic_archive.archive_directory parameter is not set
List pgsql-hackers
> On 15 Sep 2023, at 12:49, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2023-Sep-15, Daniel Gustafsson wrote:
>
>> -basic_archive_configured(ArchiveModuleState *state)
>> +basic_archive_configured(ArchiveModuleState *state, const char **errmsg)
>>
>> The variable name errmsg implies that it will contain the errmsg() data when it
>> in fact is used for errhint() data, so it should be named accordingly.
>>
>> It's probably better to define the interface as ArchiveCheckConfiguredCB
>> functions returning an allocated string in the passed pointer which the caller
>> is responsible for freeing.
>
> Also note that this callback is documented in archive-modules.sgml, so
> that needs to be updated as well.  This also means you can't backpatch
> this change, or you risk breaking external software that implements this
> interface.

Absolutely, this is master only for v17.

> I suggest that 'msg' shouldn't be a global variable.  There's no need
> for that AFAICS; but if there is, this is a terrible name for it.

Agreed.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Implement a column store for pg?
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: [PoC] pg_upgrade: allow to upgrade publisher node