Postgres upgrade(10.9 to 12.2) is failing sporadically
- We have upgraded postgres cluster from 10.5 to 12.2
- 10.5 version has also has extension lib PLV8. But we want to get rid of that extension in the upgraded version (12.2)
- Before upgrade, we have removed the extension (PLV8) and dropped all the related stored procedures.
- Created new cluster with 12.2 version and then used pg_upgrade command from that binary location.
- First we used 'check' and if succeeds then used 'link' for upgrade.
But we observed, upgrade fails sometimes at 'check' step (pg_upgrade --check
)
and some other times fails at 'link' (pg_upgrade --link
) step though check step was success.
with below logs
pg_upgrade --check
fails with below output
[-----------------------------]
[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 reg* data types in user tables ok]
[Checking for contrib/isn with bigint-passing mismatch ok]
[Checking for tables WITH OIDS ok]
[Checking for invalid "sql_identifier" user columns ok]
[]
[*failure*]
[]
Failed at "Checking for presence of required libraries"
some other times pg_upgrade --link
fails with below 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 reg* data types in user tables ok]
[][Checking for contrib/isn with bigint-passing mismatch ok]
[][Checking for tables WITH OIDS ok]
[][Checking for invalid "sql_identifier" user columns ok]
[][Creating dump of global objects ok]
[][Creating dump of database schemas]
[][ postgres]
[][*failure*]
Failed at "Checking for presence of required libraries"
Note:
- Failure is sporadic
- Both link and check are failing at phase of "Checking of required libraries"
- Problem is getting only on VMs.