[pgpool-hackers: 4408] Re: Upgrade pgpool extensions

Tatsuo Ishii ishii at sraoss.co.jp
Tue Oct 31 17:01:08 JST 2023


> Hi guys
> 
> I am implementing a code (python if it matters) for upgrading rather
> outdated pgpool 3.6 up to a bit less outdated pgpool 4.2. But we are
> planning to quickly update up to the latest version. I was stuck with how
> to remove old extensions/functions clearly and install new one.
> 
> 1. I have no questions about extensions installation. It's described well
> in documentation.
> But for removing, I'm not sure. A straightforward solution is parsing all
> names of functions/extensions from install scripts of pgpool 3.6 and
> removing them one by one.
> For pgpool_adm it's a single row. But pgpool_recovery.sql defines several
> functions. And hard coding them in the code makes it really smell.But maybe
> I missed something.

I think you don't need to remove 3.6 extensions: you can just override
3.6 extensions by 4.2 extensions.  After installing Pgpool-II 4.2
pgpool_recovery, You can run "ALTER EXTENSION pgpool_recovery UPDATE
TO '1.3'" on each database. (1.3 is the version number of
pgpool_recovery extension coming with Pgpool-II 4.2).  If this does
not work, you can run "DROP EXTENSION pgpool_recovery", then "CREATE
EXTENSION pgpool_recovery" on each database.

> 2. In the documentation examples the extensions are installed in template1
> database. It affects only databases that will be created after it. If a
> database already exists, I should install it (preliminary remove a previous
> version) to the certain database too. Right?

Yes.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list