Re: Fix a typo in pg_rotate_logfile

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Fix a typo in pg_rotate_logfile
Дата
Msg-id A8288D74-01B8-4EC9-BC9F-48916F2BE7A2@yesql.se
обсуждение исходный текст
Ответ на Re: Fix a typo in pg_rotate_logfile  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: Fix a typo in pg_rotate_logfile  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
> On 12 Feb 2024, at 21:46, Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> On Mon, Feb 12, 2024 at 09:39:06PM +0100, Daniel Gustafsson wrote:
>>> On 12 Feb 2024, at 21:32, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
>>> I happened to notice a typo in pg_rotate_logfile in ipc/signalfuncs.c
>>> - the hint message wrongly mentions that pg_logfile_rotate is part of
>>> the core; which is actually not. pg_logfile_rotate is an adminpack's
>>> 1.0 SQL function dropped in 2.0. The core defines pg_rotate_logfile
>>> SQL function instead, so use that. Here's a patch to fix the typo.
>>
>> Nice catch!  This needs to be backpatched all the way down to 12 as that
>> function wen't away a long time ago (it was marked as deprecated all the way
>> back in 9.1).
>
> This is a bit strange because, with this patch, the HINT suggests using a
> function with the same name as the one it lives in.  IIUC this is because
> adminpack's pg_logfile_rotate() uses pg_rotate_logfile(), while core's
> pg_rotate_logfile() uses pg_rotate_logfile_v2().  I suppose trying to
> rename these might be more trouble than it's worth at this point, though...

Yeah, I doubt that's worth the churn.

On that note though, we might want to consider just dropping it altogether in
v17 (while fixing the incorrect hint in backbranches)?  I can't imagine
adminpack 1.0 being in heavy use today, and skimming pgAdmin code it seems it's
only used in pgAdmin3 and not 4. Maybe it's time to simply drop old code?

--
Daniel Gustafsson




В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Patch: Add parse_type Function
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: [PATCH] Add native windows on arm64 support