how to conveniently upgrade with specific catalog change

From: ZongtianHou <zongtianhou(at)icloud(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: how to conveniently upgrade with specific catalog change
Date: 2020-07-09 09:55:03
Message-ID: 0CC0149C-CD15-4A81-B4F1-5AF8E67E57FD@icloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi, all
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?

Best Regards,
Zongtian Hou

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message ZongtianHou 2020-07-09 10:31:17 Re: how to conveniently upgrade with specific catalog change
Previous Message Marlene Villanueva 2020-07-08 13:49:33 SELECTing from a function where i don't want the results