pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: torikoshia <torikoshia@oss.nttdata.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Allow pg_archivecleanup to remove backup history files
Date: Fri, 12 May 2023 17:53:45 +0900
Message-ID: <61abc656edfba4a668b367d590b1aaab@oss.nttdata.com> (raw)
In-Reply-To: <CALj2ACWq=axkHYKkWBAy5_DuuRGXDOhju_2EsexhxpWKZ-fiHg@mail.gmail.com>
References: <d660ef741ce3d82f3b4283f1cafd576c@oss.nttdata.com>
	<20230425.172948.1630351042955772893.horikyota.ntt@gmail.com>
	<ZEhIiaCa2rdc/SLb@paquier.xyz>
	<5adce8cd5ad2269fe687d2d56a341c88@oss.nttdata.com>
	<CALj2ACWq=axkHYKkWBAy5_DuuRGXDOhju_2EsexhxpWKZ-fiHg@mail.gmail.com>

On 2023-05-10 17:52, Bharath Rupireddy wrote:
Thanks for your comments!

> Just curious to know the driving point behind this proposal - is
> pg_archivecleanup deployed in production that was unable to clean up
> the history files and there were many such history files left? It will
> help us know how pg_archivecleanup is being used.

Yes.

> Just curious to know the driving point behind this proposal - is
> pg_archivecleanup deployed in production that was unable to clean up
> the history files and there were many such history files left? It will
> help us know how pg_archivecleanup is being used.
> 
> I'm wondering if making -x generic with '-x' '.backup', is simpler
> than adding another option?

Since according to the current semantics, deleting backup history files 
with -x demands not '-x .backup' but '-x .007C9330.backup' when the file 
name is 0000000100001234000055CD.007C9330.backup, it needs special 
treatment for backup history files, right?

I think it would be intuitive and easier to remember than new option.

I was a little concerned about what to do when deleting both the files 
ending in .gz and backup history files.
Is making it possible to specify both "-x .backup" and "-x .gz" the way 
to go?

I also concerned someone might add ".backup" to WAL files, but does that 
usually not happen?

> Comments on the patch:
> 1. Why just only the backup history files? Why not remove the timeline
> history files too? Is it because there may not be as many tli switches
> happening as backups?

Yeah, do you think we should also add logic for '-x .history'?

> 2.+sub remove_backuphistoryfile_run_check
> +{
> Why to invent a new function when run_check() can be made generic with
> few arguments passed?

Thanks, I'm going to reconsider it.

-- 
Regards,

--
Atsushi Torikoshi
NTT DATA CORPORATION





view thread (34+ messages)  latest in thread

Message-ID: <61abc656edfba4a668b367d590b1aaab@oss.nttdata.com>
Permalink:  ../61abc656edfba4a668b367d590b1aaab@oss.nttdata.com/
Also on:    postgresql.org/message-id/61abc656edfba4a668b367d590b1aaab@oss.nttdata.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: torikoshia@oss.nttdata.com, bharath.rupireddyforpostgres@gmail.com, michael@paquier.xyz, horikyota.ntt@gmail.com
  Subject: Re: Allow pg_archivecleanup to remove backup history files
  In-Reply-To: <61abc656edfba4a668b367d590b1aaab@oss.nttdata.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox