Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures
Дата
Msg-id CABUevEwYoZDvZn_=coEjhv8Cr5HRf7QvHgwm0cPRyyE77p=aTw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures
Список pgsql-hackers
On Wed, Dec 21, 2022 at 1:09 AM Michael Paquier <michael@paquier.xyz> wrote:
On Tue, Dec 20, 2022 at 06:04:40PM +0530, Bharath Rupireddy wrote:
> On Tue, Dec 20, 2022 at 1:27 PM Magnus Hagander <magnus@hagander.net> wrote:
>> Caught this thread late. To me, pg_dissect_walfile_name() is a
>> really strange name for a function. Grepping our I code I see the
>> term dissect s used somewhere inside the regex code and exactly
>> zero instances elsewhere. Which is why I definitely didn't
>> recognize the term...
>>
>> Wouldn't something like pg_split_walfile_name() be a lot more
>> consistent with the rest of our names?

Fine by me to change that if there is little support for the current
naming, though the current one does not sound that bad to me either.

> Hm. FWIW, here's the patch.

"split" is used a lot for the picksplit functions, but not in any of
the existing functions as a name.  Some extra options: parse, read,
extract, calculate, deduce, get.  "parse" would be something I would
be OK with.


Not sure what you mean? We certainly have a lot of functions called split that are not the picksplit ones. split_part(). regexp_split_to_array(), regexp_split_to_table()... And ther'es things like tuiple_data_split() in pageinspect.

There are many other examples outside of postgres as well, e.g. python has a split() of pathnames, "almost every language" has a split() on strings etc. I don't think I've ever seen dissect in a place like that either (though Im sure it exists somewhere, it's hardly common)

Basically, we take one thing and turn it into 3. That very naturally rings with "split" to me.

Parse might work as well, certainly better than dissect. I'd still prefer split though.

--

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: assertion failures on BuildFarm that happened in slab.c
Следующее
От: Tom Lane
Дата:
Сообщение: postgres_fdw planning issue: EquivalenceClass changes confuse it