Re: pg_upgrade --clone error checking

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade --clone error checking
Date: 2019-05-02 16:24:17
Message-ID: CAMkU=1xrwk1zbMcwRt1VQNbTagRnOnp0jhqeOMTf5RsFdbXuDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 2, 2019 at 11:57 AM Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:

> On 2019-05-01 22:10, Jeff Janes wrote:
> > With the new pg_upgrade --clone, if we are going to end up throwing the
> > error "file cloning not supported on this platform" (which seems to
> > depend only on ifdefs) I think we should throw it first thing, before
> > any other checks are done and certainly before pg_dump gets run.
>
> Could you explain in more detail what command you are running, what
> messages you are getting, and what you would like to see instead?
>

I'm running:

pg_upgrade --clone -b /home/jjanes/pgsql/REL9_6_12/bin/ -B
/home/jjanes/pgsql/origin_jit/bin/ -d /home/jjanes/pgsql/data_96/ -D
/home/jjanes/pgsql/data_clone/

And I get:

Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for reg* data types in user tables ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for tables WITH OIDS ok
Checking for invalid "unknown" user columns ok
Creating dump of global objects ok
Creating dump of database schemas
ok
Checking for presence of required libraries ok

file cloning not supported on this platform
Failure, exiting

I think the error message wording is OK, I think it should be thrown
earlier, before the "Creating dump of database schemas" (which can take a
long time), and preferably before either database is even started. So
ideally it would be something like:

Performing Consistency Checks
-----------------------------
Checking cluster versions
Checking file cloning support
File cloning not supported on this platform
Failure, exiting

When something is doomed to fail, we should report the failure as early as
feasibly detectable.

Cheers,

Jeff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-05-02 16:28:49 Re: pg_upgrade --clone error checking
Previous Message Antonin Houska 2019-05-02 16:17:36 Re: Attempt to consolidate reading of XLOG page