Re: pg_upgrade fails in 9.6 beta1

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Palle Girgensohn <girgen(at)pingpong(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade fails in 9.6 beta1
Date: 2016-05-16 21:45:05
Message-ID: CAB7nPqSYEZC+eRKKXe3JRehuo=FZMzPBz8ateGh0uy3uE5Szvw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 17, 2016 at 12:07 AM, Palle Girgensohn <girgen(at)pingpong(dot)net> wrote:
> pg_restore: creating TABLE "public.cal_event"
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 205; 1259 3538451239 TABLE cal_event nobody
> pg_restore: [archiver (db)] could not execute query: ERROR: could not create directory "pg_tblspc/16400/PG_9.4_201605051/16403": No such file or directory

That's weird, a directory with the old name is tried to be created in
the new 9.6 cluster if I follow that correctly.

> Command was:
> -- For binary upgrade, must preserve pg_type oid
> SELECT pg_catalog.binary_upgrade_set_next_pg_type_oid('3538451241'::pg_cat...
>
> now
> "pg_tblspc/16400/PG_9.4_201605051/16403"
> is a mixup of the new cluster pg_tblspc/16400, the old version PG_9.4_, and the new cluster 201605051/
> Seems like a bug to me, it shouldn't create pg_tblspc/16400/PG_9.4_201605051, the 9.6 tablespace is in data96/pg_tblspc/16400/PG_9.6_201605051 (not 9.4).

Based on the information you gave out, a tablespace and visibly a
custom type, I have tried a 9.4->9.6 upgrade with this schema and
things are working for me with -k:
CREATE TABLESPACE popo LOCATION '$TBSPACE_DIR';
CREATE TYPE yoyo AS (a int);
CREATE TABLE toto (a int PRIMARY KEY, b yoyo) TABLESPACE popo;

The old and new tablespaces are in correct shape, even if I did not
provide a tablespace map.

Could you provide more details about the schema causing this error? Do
you have for example some roles beginning with "pg_" as prefix?
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-05-16 21:47:16 Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API
Previous Message Michael Paquier 2016-05-16 21:01:55 Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission denied”