Re: how to conveniently upgrade with specific catalog change

From: ZongtianHou <zongtianhou(at)icloud(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: how to conveniently upgrade with specific catalog change
Date: 2020-07-29 09:42:17
Message-ID: 55E756B6-BD17-413C-B435-D17D4858FD06@icloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thank you for this info

> On Jul 9, 2020, at 10:35 PM, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> On Thu, 2020-07-09 at 17:55 +0800, ZongtianHou wrote:
>> I am doing some development based on postgres(8.x.x) and encountered a problem when doing upgrade. Normally, there are two ways for me to do upgrade.
>> 1. when new version without catalog change, I can replace the binary and restart the cluster.
>> 2. when new version with catalog change like add a column or a row to a system table, I can replace
>> the binary and turn allow_system_table_mods to all, do all the changes, then restart.
>>
>> But, when new version add a new built-in datatype, like json, which will insert a row in pg_type with specific oid,
>> I can not find a simple way to do this. I look up the initdb code, it run the postgres program in bootstrap mode,
>> feed it data from postgres.bki file which support oid specification. Simplify the question, How can I do upgrade
>> conveniently if I just need to insert one row in one system table with specific oid? Can I do it in upgrade mode
>> somehow or I need to run some upgrade program?
>
> From 8.4 on, you can use pg_upgrade to upgrade.
>
> Otherwise, you need pg_dumpall and restore.
>
> Just installing the new software only works for upgrades between 8.4.x and 8.4.y
> or 12.x and 12.y.
>
> Yours,
> Laurenz Albe
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message avinash varma 2020-07-29 11:39:51 Pgagent not working
Previous Message Sidney Aloisio Ferreira Pryor 2020-07-28 18:20:06 RE: How can i be certain autovacuum is causing reuse if table still grows