pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pg_upgrade should truncate/remove its logs before running
Date: Tue, 11 Jan 2022 22:08:13 -0600
Message-ID: <20220112040813.GD14051@telsasoft.com> (raw)
In-Reply-To: <Yd5SOupY+FHbiXLD@paquier.xyz>
References: <20211217172113.GL17618@telsasoft.com>
	<YcBnT2awK89o6P5I@paquier.xyz>
	<20211221033926.GX17618@telsasoft.com>
	<YcLYAPsiDlWF6w7o@paquier.xyz>
	<238201.1640184746@sss.pgh.pa.us>
	<20211222163611.GC17618@telsasoft.com>
	<20220108184857.GI14051@telsasoft.com>
	<Yd00xmV+rdffAQxf@paquier.xyz>
	<20220111200307.GA14051@telsasoft.com>
	<Yd5SOupY+FHbiXLD@paquier.xyz>

On Wed, Jan 12, 2022 at 12:59:54PM +0900, Michael Paquier wrote:
> On Tue, Jan 11, 2022 at 02:03:07PM -0600, Justin Pryzby wrote:
> > There's no reason not to.  We created the dir, and the user didn't specify to
> > preserve it.  It'd be their fault if they put something valuable there after
> > starting pg_upgrade.
> 
> This is a path for the data internal to pg_upgrade.  My take is that
> the code simplifications the new option brings are more valuable than
> this assumption, which I guess would unlikely happen.  I may be wrong,
> of course.  By the way, while thinking about that, should we worry
> about --logdir="."?

I asked about that before.  Right now, it'll exit(1) when mkdir fails.

I had written a patch to allow "." by skipping mkdir (or allowing it to fail if
errno == EEXIST), but it seems like an awfully bad idea to try to make that
work with rmtree().

-- 
Justin





view thread (53+ messages)  latest in thread

Message-ID: <20220112040813.GD14051@telsasoft.com>
Permalink:  ../20220112040813.GD14051@telsasoft.com/
Also on:    postgresql.org/message-id/20220112040813.GD14051@telsasoft.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: pryzby@telsasoft.com, michael@paquier.xyz, tgl@sss.pgh.pa.us, daniel@yesql.se, peter.eisentraut@enterprisedb.com, andrew@dunslane.net, bruce@momjian.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: pg_upgrade should truncate/remove its logs before running
  In-Reply-To: <20220112040813.GD14051@telsasoft.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