pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Brad White <b55white@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Upgrading to v12
Date: Fri, 11 Nov 2022 13:02:58 -0800
Message-ID: <ec6d3d2e-18f7-db89-c269-b5f28cfe0183@aklaver.com> (raw)
In-Reply-To: <CAA_1=91Vc9a2g4wKNsHoNoMuXDpqQXNhhWq0mRyJMxUAKiEkDQ@mail.gmail.com>
References: <CAA_1=91Vc9a2g4wKNsHoNoMuXDpqQXNhhWq0mRyJMxUAKiEkDQ@mail.gmail.com>

On 11/11/22 12:43, Brad White wrote:
> I'm upgrading from v9.4 to v12.10 as a half step to 15.
> 
> Q1: How do I tell it which database to upgrade?
> I only need the primary.
> Not the half dozen restored copies.
> Or do I need to detach everything I don't want copied?

1) If you are using pg_upgrade then it only works on the entire cluster 
not individual databases.

2) This is not SQLite there is no detaching of databases.

3) I you want to move a single database then you are looking at 
pg_dump/pg_restore or logical replication.

> 
> Q2: I get this error, and then at the end, it says "No error."

What was the complete pg_upgrade command you used?

> 
> Performing Consistency Checks
> -----------------------------
> Checking cluster versions                                   ok
> SQL command failed
> WITH regular_heap (reloid, indtable, toastheap) AS (   SELECT c.oid, 
> 0::oid, 0::oid   FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace 
> n          ON c.relnamespace = n.oid   WHERE relkind IN ('r', 'm') AND   
>    ((n.nspname !~ '^pg_temp_' AND       n.nspname !~ '^pg_toast_temp_' 
> AND       n.nspname NOT IN ('pg_catalog', 'information_schema',         
>                  'binary_upgrade', 'pg_toast') AND       c.oid >= 
> 16384::pg_catalog.oid) OR      (n.nspname = 'pg_catalog' AND       
> relname IN ('pg_largeobject') ))),   toast_heap (reloid, indtable, 
> toastheap) AS (   SELECT c.reltoastrelid, 0::oid, c.oid   FROM 
> regular_heap JOIN pg_catalog.pg_class c       ON regular_heap.reloid = 
> c.oid   WHERE c.reltoastrelid != 0),   all_index (reloid, indtable, 
> toastheap) AS (   SELECT indexrelid, indrelid, 0::oid   FROM 
> pg_catalog.pg_index   WHERE indisvalid AND indisready     AND indrelid 
> IN         (SELECT reloid FROM regular_heap          UNION ALL         
>   SELECT reloid FROM toast_heap)) SELECT all_rels.*, n.nspname, 
> c.relname,   c.relfilenode, c.reltablespace, 
> pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM (SELECT * 
> FROM regular_heap       UNION ALL       SELECT * FROM toast_heap       
> UNION ALL       SELECT * FROM all_index) all_rels   JOIN 
> pg_catalog.pg_class c       ON all_rels.reloid = c.oid   JOIN 
> pg_catalog.pg_namespace n      ON c.relnamespace = n.oid   LEFT OUTER 
> JOIN pg_catalog.pg_tablespace t      ON c.reltablespace = t.oid ORDER BY 1;
> ERROR:  could not access status of transaction 22316920
> DETAIL:  Could not read from file "pg_clog/0015" at offset 73728: No error.

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (31+ messages)  latest in thread

Message-ID: <ec6d3d2e-18f7-db89-c269-b5f28cfe0183@aklaver.com>
Permalink:  ../ec6d3d2e-18f7-db89-c269-b5f28cfe0183@aklaver.com/
Also on:    postgresql.org/message-id/ec6d3d2e-18f7-db89-c269-b5f28cfe0183@aklaver.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, b55white@gmail.com
  Subject: Re: Upgrading to v12
  In-Reply-To: <ec6d3d2e-18f7-db89-c269-b5f28cfe0183@aklaver.com>
  References: <CAA_1=91Vc9a2g4wKNsHoNoMuXDpqQXNhhWq0mRyJMxUAKiEkDQ@mail.gmail.com> <ec6d3d2e-18f7-db89-c269-b5f28cfe0183@aklaver.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