How can a script identify valid PostgreSQL upgrade paths?

0

I'm trying to write a script to upgrade an RDS PostgreSQL instance from version x to version y. Since RDS only supports direct upgrades to certain versions, the script uses multiple "hops" to upgrade, using the fewest number of upgrade actions possible. Unfortunately, I've not been able to come up with a reliable way to identify those direct upgrade paths.

The documentation for upgrading PostgreSQL database versions (Upgrading the PostgreSQL DB engine for Amazon RDS) includes a table show the direct upgrade versions supported for every supported (and deprecated) version. For example, an instance running PostgreSQL 12.14 can be directly upgraded to versions

15.2 14.7 13.14 13.13 13.12 13.11 13.10 12.18 12.17 12.16 12.15

if you upgrade an instance using the RDS console, the DB engine version dropdown shows the same list, likewise the modify-db-command fails if passed an --engine-version value other than these version.

The documentation claims the upgrade table is a summary of the results from running the following CLI command:

aws rds describe-db-engine-versions --engine postgres --engine-version your-version --query "DBEngineVersions[*].ValidUpgradeTarget[*].{EngineVersion:EngineVersion}" --output text

However, when I run this query directly, it lists more options than are allowed by the console dropdown (or equivalent modify-db-instance CLI command):

16.1 15.5 15.4 15.3 15.2 14.10 14.9 14.8 14.7 13.13 13.12 13.11 13.10 12.17 12.16 12.15

I'd hoped to be able to use this query as the basis for this script, but due to this discrepancy I can't. Is there some additional criteria being used to generate the table that I'm not seeing? Otherwise I may be reduced to scraping the HTML page :-(

Appreciate any insight y'all can provide.

질문됨 2달 전135회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠