BUG #18635: " $libdir/adminpack could not be loaded" error with pg_upgrade to PostgreSQL17
The following bug has been logged on the website:
Bug reference: 18635
Logged by: xu bing
Email address: bing.xu.uh@fujifilm.com
PostgreSQL version: 17.0
Operating system: windows server 2019 Datacenter
Description:
■Describe the bug
While upgrading a PSQL 14. 3 instance to PSQL 17 I have an error with
pg_upgrade, saying that the libraray "$libdir/adminpack" can not be
loaded.
■To Reproduce
1.Install PostgreSQL 17
2.Stop PostgreSQL Service
net stop postgresql-x64-14
3.Run pg_upgrade
"C:\Program Files\PostgreSQL\17\bin\pg_upgrade.exe" -U postgres -d
"C:\Program Files\PostgreSQL\14\data" -D "C:\Program
Files\PostgreSQL\17\data" -b "C:\Program Files\PostgreSQL\14\bin" -B
"C:\Program Files\PostgreSQL\17\bin"
4.Output
整合性チェックを実行しています。
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking data type usage ok
Creating dump of global objects ok
Creating dump of database schemas
ok
Checking for presence of required libraries 致命的
このクラスタでは、移行先の環境にはないロード可能ライブラリを参照しています。
これらのライブラリを移行先の環境に追加するか、もしくは移行元の環境から
それらを使っている関数を削除してください。 問題のライブラリの一覧は、
以下のファイルに入っています:
C:/Program
Files/PostgreSQL/17/data/pg_upgrade_output.d/20240927T110225.604/loadable_libraries.txt
loadable_libraries.txt
ライブラリ"$libdir/adminpack"をロードできませんでした: ERROR:
繝輔ぃ繧、繝ォ"$libdir/adminpack"縺ォ繧「繧ッ繧サ繧ケ縺ァ縺阪∪縺帙s縺ァ縺励◆: No such file or
directory
データベース: postgres
■Additional infos
I saw that Release Notes said that adminpack contrib extension has been
Removed, but why is it still used in pg_upgrade of PostgreSQL17.
Also please tell me the solution.
-------------------------------------
●Remove adminpack contrib extension (Daniel Gustafsson) §
This was used by now end-of-life pgAdmin III.
https://www.postgresql.org/docs/release/17.0/
----------------------------------------------------
On Thursday, September 26, 2024, PG Bug reporting form <
noreply@postgresql.org> wrote:
The following bug has been logged on the website:
Bug reference: 18635
Logged by: xu bing
Email address: bing.xu.uh@fujifilm.com
PostgreSQL version: 17.0
Operating system: windows server 2019 Datacenter
Description:■Additional infos
I saw that Release Notes said that adminpack contrib extension has been
Removed, but why is it still used in pg_upgrade of PostgreSQL17.
Also please tell me the solution.-------------------------------------
●Remove adminpack contrib extension (Daniel Gustafsson) §
This was used by now end-of-life pgAdmin III.https://www.postgresql.org/docs/release/17.0/
----------------------------------------------------
You will,need to uninstall that extension from all of your databases before
you can upgrade to a version that does not include it.
David J.
Hello
Dear David
You will,need to uninstall that extension from all of your databases before you can upgrade to a version that does not include it.
I uninstalled adminpack from the database and was able to upgrade to PostgreSQL 17 normally,
but why is there no record in the PostgreSQL 17 upgrade manual?
https://www.postgresql.org/docs/current/pgupgrade.html
best regards xu
From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Friday, September 27, 2024 10:47 PM
To: Bing Xu <bing.xu.uh@fujifilm.com>; pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18635: " $libdir/adminpack could not be loaded" error with pg_upgrade to PostgreSQL17
On Thursday, September 26, 2024, PG Bug reporting form <noreply@postgresql.org<mailto:noreply@postgresql.org>> wrote:
The following bug has been logged on the website:
Bug reference: 18635
Logged by: xu bing
Email address: bing.xu.uh@fujifilm.com<mailto:bing.xu.uh@fujifilm.com>
PostgreSQL version: 17.0
Operating system: windows server 2019 Datacenter
Description:
■Additional infos
I saw that Release Notes said that adminpack contrib extension has been
Removed, but why is it still used in pg_upgrade of PostgreSQL17.
Also please tell me the solution.
-------------------------------------
●Remove adminpack contrib extension (Daniel Gustafsson) §
This was used by now end-of-life pgAdmin III.
https://www.postgresql.org/docs/release/17.0/
----------------------------------------------------
You will,need to uninstall that extension from all of your databases before you can upgrade to a version that does not include it.
David J.
On Wednesday, October 9, 2024, Bing Xu <bing.xu.uh@fujifilm.com> wrote:
Hello
Dear David
You will,need to uninstall that extension from all of your databases
before you can upgrade to a version that does not include it.
I uninstalled adminpack from the database and was able to upgrade to
PostgreSQL 17 normally,but why is there no record in the PostgreSQL 17 upgrade manual?
That oversight has been corrected for v17.1
David J.
On Wed, Oct 9, 2024, at 6:17 AM, Bing Xu wrote:
I uninstalled adminpack from the database and was able to upgrade to PostgreSQL 17 normally,
but why is there no record in the PostgreSQL 17 upgrade manual?
... because this list can be large along the years. That's why pg_upgrade adopts
loadable_libraries.txt file that reports the loadable module failures. You
should run pg_upgrade with --check option and if there is an error, check the
referred file.
8<----------------------------------------------------------------------------8<
$ /h/pg17/bin/pg_upgrade -b /h/pg16/bin -B /h/pg17/bin -d /tmp/foo16 -D /tmp/foo17 --check
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking data type usage ok
Checking for presence of required libraries fatal
Your installation references loadable libraries that are missing from the
new installation. You can add these libraries to the new installation,
or remove the functions using them from the old installation. A list of
problem libraries is in the file:
/tmp/foo17/pg_upgrade_output.d/20241009T213155.590/loadable_libraries.txt
Failure, exiting
$ cat /tmp/foo17/pg_upgrade_output.d/20241009T213948.961/loadable_libraries.txt
could not load library "$libdir/adminpack": ERROR: could not access file "$libdir/adminpack": No such file or directory
In database: postgres
8<----------------------------------------------------------------------------8<
It is highly recommended to read all release notes [1]https://www.postgresql.org/docs/17/release-17.html#RELEASE-17-MODULES from version X+1 to Y
where X is your current version and Y is your new version before upgrading.
In this particular case (adminpack), even though it belongs to Additional
Modules section, I would add it to Migration to Version 17 because it is an
incompatibility with the previous releases. Well, this ship has already sailed
and it is documented (lines below).
[1]: https://www.postgresql.org/docs/17/release-17.html#RELEASE-17-MODULES
--
Euler Taveira
EDB https://www.enterprisedb.com/
Dear David
That oversight has been corrected for v17.1
When upgrading from a version prior to PostgreSQL 17 to PostgreSQL 17,
it is necessary to uninstall adminpack.
You mentioned this has been corrected for v17.1.
but after verifying,
the same issue still exists,
and I did not find any related notes or other information in the pgupgrade notes.
https://www.postgresql.org/docs/current/pgupgrade.html
XU BING
From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Wednesday, October 9, 2024 9:30 PM
To: Bing Xu <bing.xu.uh@fujifilm.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18635: " $libdir/adminpack could not be loaded" error with pg_upgrade to PostgreSQL17
On Wednesday, October 9, 2024, Bing Xu <bing.xu.uh@fujifilm.com<mailto:bing.xu.uh@fujifilm.com>> wrote:
Hello
Dear David
You will,need to uninstall that extension from all of your databases before you can upgrade to a version that does not include it.
I uninstalled adminpack from the database and was able to upgrade to PostgreSQL 17 normally,
but why is there no record in the PostgreSQL 17 upgrade manual?
That oversight has been corrected for v17.1
David J.
On Mon, Nov 18, 2024 at 11:23 PM Bing Xu <bing.xu.uh@fujifilm.com> wrote:
Dear David
That oversight has been corrected for v17.1
When upgrading from a version prior to PostgreSQL 17 to PostgreSQL 17,
it is necessary to uninstall adminpack.
You mentioned this has been corrected for v17.1.
Sorry, I should have been more clear, our release notes hadn't mentioned
this in 17.0 and now they do.
but after verifying,
the same issue still exists,
and I did not find any related notes or other information in the
pgupgrade notes.
You will not find version-specific commentary in the notes for the
pgupgrade application. We have release notes for them.
David J.
Dear David
You will not find version-specific commentary in the notes for the pgupgrade application. We have release notes for them.
Thank you for your response.
Could you please tell me specifically where it is documented?
BINGXU
From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Tuesday, November 19, 2024 10:10 PM
To: Bing Xu <bing.xu.uh@fujifilm.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18635: " $libdir/adminpack could not be loaded" error with pg_upgrade to PostgreSQL17
On Mon, Nov 18, 2024 at 11:23 PM Bing Xu <bing.xu.uh@fujifilm.com<mailto:bing.xu.uh@fujifilm.com>> wrote:
Dear David
That oversight has been corrected for v17.1
When upgrading from a version prior to PostgreSQL 17 to PostgreSQL 17,
it is necessary to uninstall adminpack.
You mentioned this has been corrected for v17.1.
Sorry, I should have been more clear, our release notes hadn't mentioned this in 17.0 and now they do.
but after verifying,
the same issue still exists,
and I did not find any related notes or other information in the pgupgrade notes.
https://www.postgresql.org/docs/current/pgupgrade.html
You will not find version-specific commentary in the notes for the pgupgrade application. We have release notes for them.
David J.
On Tuesday, November 19, 2024, Bing Xu <bing.xu.uh@fujifilm.com> wrote:
You will not find version-specific commentary in the notes for the
pgupgrade application. We have release notes for them.
Could you please tell me specifically where it is documented?
https://www.postgresql.org/docs/current/release-17.html#RELEASE-17-MIGRATION
David J.
Dear David
Thank you for your response.
https://www.postgresql.org/docs/current/release-17.html#RELEASE-17-MIGRATION
Is it the following passage?
------------------------------------
Remove adminpack contrib extension (Daniel Gustafsson) §
This was used by now end-of-life pgAdmin III.
So, does this mean that when upgrading from PostgreSQL 14/15/16 to PostgreSQL 17,
You need to manually uninstall the adminpack of PostgreSQL 14/15/16,
Instead of letting pg_upgrade.exe automatically uninstall adminpack.
Is my understanding correct?
Bing XU
From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Wednesday, November 20, 2024 12:52 PM
To: Bing Xu <bing.xu.uh@fujifilm.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18635: " $libdir/adminpack could not be loaded" error with pg_upgrade to PostgreSQL17
On Tuesday, November 19, 2024, Bing Xu <bing.xu.uh@fujifilm.com<mailto:bing.xu.uh@fujifilm.com>> wrote:
You will not find version-specific commentary in the notes for the pgupgrade application. We have release notes for them.
Could you please tell me specifically where it is documented?
https://www.postgresql.org/docs/current/release-17.html#RELEASE-17-MIGRATION
David J.
On Tuesday, November 19, 2024, Bing Xu <bing.xu.uh@fujifilm.com> wrote:
Thank you for your response.
RELEASE-17-MIGRATION
Is it the following passage?
Yes
Instead of letting pg_upgrade.exe automatically uninstall adminpack.
Is my understanding correct?
pg_upgrade will never uninstall anything. It installs whatever is in the
source cluster unconditionally. Except catalogs, which are instead built in
the new cluster during initdb.
David J.