Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtTGs-00034p-OY for pgsql-admin@arkaria.postgresql.org; Thu, 09 Jul 2020 09:55:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtTGr-00089Q-Mx for pgsql-admin@arkaria.postgresql.org; Thu, 09 Jul 2020 09:55:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtTGr-00089C-FT for pgsql-admin@lists.postgresql.org; Thu, 09 Jul 2020 09:55:13 +0000 Received: from pv50p00im-ztdg10021901.me.com ([17.58.6.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtTGo-0002DN-UO for pgsql-admin@postgresql.org; Thu, 09 Jul 2020 09:55:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1594288507; bh=uYHXdf9nEAylH7OsiXcHpxjNovZ/5r3R3HGfrzZqKV0=; h=From:Content-Type:Subject:Date:To:Message-Id; b=fTT+5/Gv0TdteKt4SuvvJMwdNANLletdL8kTO+IXScEQ6HLu+Tz2btthGZDwLVGOP M0AlUQXebPxOpqCBsxNuJ49jyWSGgH5KqX3nERJp89ymbbzO6QVk+PCWx/fToMqDAv +7b+zkgRx63PhHkk0kJG9gu6rANMkCrFaF7JEDYV8ErTaZzDVtfb2wioHmTlwY/jp3 xe1eNZV9XyphcFOfeTDhf7h8PXVphZ/3DUv2HRPjjgVaHVvdlsMxwMtWLywKhyP4sE lN7refTPG3GobQiiFy9aIrUugM+Jswwnxic3tik714xHIqzOL9pFJ0H+RWRCu3fNnz bEI7BRZRAUwaA== Received: from [192.168.1.93] (unknown [116.213.168.141]) by pv50p00im-ztdg10021901.me.com (Postfix) with ESMTPSA id 109F78805F2 for ; Thu, 9 Jul 2020 09:55:06 +0000 (UTC) From: ZongtianHou Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: how to conveniently upgrade with specific catalog change Date: Thu, 9 Jul 2020 17:55:03 +0800 References: <99E3D554-1D96-42F0-9647-B7D2CECB3E7E@icloud.com> <1647744.1592576042@sss.pgh.pa.us> To: pgsql-admin In-Reply-To: <1647744.1592576042@sss.pgh.pa.us> Message-Id: <0CC0149C-CD15-4A81-B4F1-5AF8E67E57FD@icloud.com> X-Mailer: Apple Mail (2.3608.40.2.2.4) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-09_05:2020-07-09,2020-07-09 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=479 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2004280000 definitions=main-2007090078 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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=