Re: Function for listing pg_wal/summaries directory

Fujii Masao <masao.fujii@oss.nttdata.com>

From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Nathan Bossart <nathandbossart@gmail.com>, Michael Paquier <michael@paquier.xyz>
Cc: btogiwarayuushi <btogiwarayuushi@oss.nttdata.com>, pgsql-hackers@postgresql.org
Date: 2024-10-08T03:41:16Z
Lists: pgsql-hackers

On 2024/10/07 23:35, Nathan Bossart wrote:
> On Mon, Oct 07, 2024 at 10:07:10AM +0900, Michael Paquier wrote:
>> On Fri, Oct 04, 2024 at 10:02:11AM -0500, Nathan Bossart wrote:
>>> Could you explain why you feel the existing support functions are
>>> insufficient?
>>
>> Because it is not possible to outsource the scan of pg_wal/summaries/
>> to a different role, no?
> 
> I was under the impression that you could do this with
> pg_available_wal_summaries() [0].
> 
> [0] https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-INFO-WAL-SUMMARY

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.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION




Commits

  1. Add pg_ls_summariesdir().