Re: Standardize LSN-based filename

Поиск
Список
Период
Сортировка
От Japin Li
Тема Re: Standardize LSN-based filename
Дата
Msg-id ME0P300MB0445CECF8FA6354454152D53B633A@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответ на Re: Standardize LSN-based filename  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: Standardize LSN-based filename
Список pgsql-hackers
On Wed, Aug 20, 2025 at 12:37:27AM +0900, Fujii Masao wrote:
> On Wed, Aug 13, 2025 at 9:56 AM Japin Li <japinli@hotmail.com> wrote:
> >
> > In commit 2633dae2e, I standardized the LSN formatting for log messages using
> > zero-padding.  However, I mistakenly changed the snapshot file name[1].
> >
> > I'd like to standardize the LSN-based filename.  What's your feedback on this?
> 
> Thanks for starting a new thread on this topic!
> 
> I understand it's worth standardizing LSN formatting in log messages
> so users can read them consistently across tools and easily compare
> values. On the other hand, is there a strong reason to also standardize
> file names with zero-padding? Is it just for consistency, or is it to make
> file names more sortable?
> 

Yeah.  It's for both consistency and for proper file sorting.

Zero-padding ensures that when a file system or tool sorts the snapshot files
alphabetically, the order is also chronological. For example, without
zero-padding, 2-1.snap would come before 10-1.snap, which is incorrect.  With
zero-padding, the files would sort as 00000002-00000001.snap and
00000010-00000001.snap, which is the correct order.

-- 
Best regards,
Japin Li
ChengDu WenWu Information Technology Co., LTD.



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