Re: pg_upgrade should truncate/remove its logs before running

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pg_upgrade should truncate/remove its logs before running
Date: 2022-01-24 19:44:21
Message-ID: Ye8BlRKfIGfCg802@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 24, 2022 at 11:41:17AM -0600, Justin Pryzby wrote:
> On Mon, Jan 24, 2022 at 12:39:30PM -0500, Bruce Momjian wrote:
> > On Mon, Jan 24, 2022 at 10:59:40AM +0900, Michael Paquier wrote:
> > > On Thu, Jan 20, 2022 at 07:51:37PM +0900, Michael Paquier wrote:
> > > > Neat idea. That would work fine for my case. So I am fine to stick
> > > > with this suggestion.
> > >
> > > I have been looking at this idea, and the result is quite nice, being
> > > simpler than anything that has been proposed on this thread yet. We
> > > get a simpler removal logic, and there is no need to perform any kind
> > > of sanity checks with the output path provided as long as we generate
> > > the paths and the dirs after adjust_data_dir().
> > ...
> > >
> > > <para>
> > > <application>pg_upgrade</application> creates various working files, such
> > > - as schema dumps, in the current working directory. For security, be sure
> > > - that that directory is not readable or writable by any other users.
> > > + as schema dumps, stored within <literal>pg_upgrade_output.d</literal> in
> > > + the directory of the new cluster.
> > > </para>
> >
> > Uh, how are we instructing people to delete that pg_upgrade output
> > directory? If pg_upgrade completes cleanly, would it be removed
> > automatically?
>
> Clearly.

OK, thanks. There are really two cleanups --- first, the "log"
directory, and second deletion of the old cluster by running
delete_old_cluster.sh.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

If only the physical world exists, free will is an illusion.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-01-24 19:47:03 Re: Error running configure on Mac
Previous Message Robert Haas 2022-01-24 19:44:10 Re: preserving db/ts/relfilenode OIDs across pg_upgrade (was Re: storing an explicit nonce)