Re: pg_upgrade and generated column

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: kaido vaikla <kaido(dot)vaikla(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_upgrade and generated column
Date: 2025-03-03 14:10:08
Message-ID: CAKFQuwYf-eHb5XVQQ6XcPgQF2Sc0WsVGmnfWvhrHQns+nbV3KA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Monday, March 3, 2025, kaido vaikla <kaido(dot)vaikla(at)gmail(dot)com> wrote:

>
>
> ...
> pg_restore: from TOC entry 226; 1259 17061 TABLE m_access_cert_campaign
> iamappadmin
> pg_restore: error: could not execute query: ERROR: column "objecttype" in
> child table must not be a generated column
> Command was:
> -- For binary upgrade, must preserve pg_type oid
> SELECT pg_catalog.binary_upgrade_set_next_pg_type_oid('17063'::pg_
> catalog.oid);
> ...
>
>
> I can find some descriptions of the problems from internet,
> but there are no instructions or recommendations on postgres.org,
> what is the "correct" way to upgrade a db if it has a "generated column".
> Some suggestion pls. Can i use pg_upgrade at all?
>

The release notes indicate that the parent and child must agree on whether
a column is generated or not. To upgrade to v16 you must ensure your
tartitioned table follows the new rule in v15 first.

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Banck 2025-03-03 14:16:15 Re: Super user password explicit in patroni yml
Previous Message Imran Khan 2025-03-03 14:08:31 Re: pg_upgrade and generated column