我正在使用此命令 sudo apt-get install postgresql-11-repack
来安装 pg_repack(默认为 1.4.8)。
postgresql-11-repack is already the newest version (1.4.8-1.pgdg20.04+1).
Run Code Online (Sandbox Code Playgroud)
当我在 rds postgres 11 中运行“创建扩展 pg_repack”时,它默认使用版本 1.4.4 创建。
List of installed extensions
Name | Version | Schema | Description
--------------+---------+------------+--------------------------------------------------------------
pg_repack | 1.4.4 | public | Reorganize tables in PostgreSQL databases with minimal locks
Run Code Online (Sandbox Code Playgroud)
因此 pg_repack 由于 ec2 和 db 之间的版本号不匹配而失败。
ERROR: pg_repack failed with error: program 'pg_repack 1.4.8' does not match database library 'pg_repack 1.4.4'
Run Code Online (Sandbox Code Playgroud)