Re: Function for listing pg_wal/summaries directory

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, btogiwarayuushi <btogiwarayuushi(at)oss(dot)nttdata(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Function for listing pg_wal/summaries directory
Date: 2024-10-08 14:36:20
Message-ID: ZwVDZERq0aGCHu_C@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 08, 2024 at 01:19:52PM +0900, Michael Paquier wrote:
> On Tue, Oct 08, 2024 at 12:41:16PM +0900, Fujii Masao wrote:
>> One benefit of supporting something like pg_ls_summariesdir() is that
>> it allows us to view the last modification time of each WAL summary file
>> and estimate when they'll be removed based on wal_summary_keep_time.
>>
>> Of course, we could also extend the existing function to report
>> the last modification time if this use case is valid, though.
>
> My argument is about knowing the size of each file, for monitoring of
> disk space. The retention can be controlled by a GUC based on time,
> and this function requires knowing about the file name format.

Okay. I have no problem with adding something like pg_ls_summariesdir(),
but I guess I was hopeful we could just add any missing information to the
existing WAL summarization information functions. A new pg_ls_*dir()
function would indeed fit nicely with the existing suite of generic file
access functions.

The patch posted upthread looks reasonable to me, so I'll go commit it soon
unless there is any feedback. IMHO we should consider alphabetizing the
table in the docs [0], too.

[0] https://www.postgresql.org/docs/devel/functions-admin.html#FUNCTIONS-ADMIN-GENFILE

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-10-08 15:11:08 Re: Statistics Import and Export
Previous Message Andrey M. Borodin 2024-10-08 14:33:03 Re: [PATCH] Add min/max aggregate functions to BYTEA