Re: pg_upgrade: fail early if a tablespace dir already exists for new cluster version

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pg_upgrade: fail early if a tablespace dir already exists for new cluster version
Date: 2020-10-16 00:37:43
Message-ID: 20201016003743.GI3797@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 15, 2020 at 05:19:59PM -0700, Andres Freund wrote:
> Hi,
>
> On 2020-10-15 19:35:30 -0400, Bruce Momjian wrote:
> > On Fri, Oct 9, 2020 at 07:42:51PM -0400, Bruce Momjian wrote:
> > > On Fri, Oct 9, 2020 at 02:23:10PM -0500, Justin Pryzby wrote:
> > > > In my local branch, I had revised this comment to say:
> > > >
> > > > + * Note, v8.4 has no tablespace_suffix, which is fine so long as the version we
> > > > + * being upgraded *to* has a suffix, since it's not allowed to pg_upgrade from
> > > > + * a version to the same version if tablespaces are in use.
> > >
> > > OK, updated patch attached. Also, from your original patch, I didn't
> > > need to call canonicalize_path() since we are not comparing paths, and I
> > > didn't need to include common/relpath.h. I also renamed a variable.
> >
> > Patch applied to all supported versions. Thanks for the report, and the
> > patch. While I listed you as reporter, I forgot to list you as the
> > patch author --- Tom, can you remember that for the minor release notes
> > please? Thanks
>
> This fails on some animals <= 11, because we didn't yet rely on C99.
>
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rhinoceros&dt=2020-10-15%2023%3A52%3A04
> check.c:503:2: error: \342\200\230for\342\200\231 loop initial declarations are only allowed in C99 mode
> for (int tblnum = 0; tblnum < os_info.num_old_tablespaces; tblnum++)

Thanks, fixed.

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

The usefulness of a cup is in its emptiness, Bruce Lee

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2020-10-16 00:59:38 Re: Online checksums verification in the backend
Previous Message Andres Freund 2020-10-16 00:19:59 Re: pg_upgrade: fail early if a tablespace dir already exists for new cluster version