Skip to content
PGDG 仓库

PGDG 仓库

Pigsty PGSQL 仓库旨在与 PostgreSQL PGDG 官方仓库 配合使用。

Pigsty 依赖 PGDG 仓库中原生的 PostgreSQL 内核软件包,并在此基础上提供额外的扩展插件。

仓库可用性以当前软件包索引为准,并反映在下方平台表中。

快速上手

您可以安装 pig - CLI 工具,并使用它添加 pgdg / pigsty 仓库(推荐):

pig repo add pgdg                         # 添加 PGDG 仓库
pig repo add pgdg -u                      # 添加 PGDG 仓库,并更新本地缓存
pig repo add pgdg -u --region=default     # 强制使用全球默认区域的仓库(postgresql.org)
pig repo add pgdg -u --region=china       # 使用腾讯云 PGDG 中国镜像仓库
pig repo add pgsql -u                     # pgsql = pgdg + pigsty-pgsql (同时添加 Pigsty 与 PGDG 官方仓库)
pig repo add -u                           # all = node + pgsql (pgdg + pigsty) + infra,一次性添加所有仓库

镜像

中国区域的 PGDG 路由统一使用腾讯云 PostgreSQL 镜像: https://mirrors.cloud.tencent.com/postgresql/repos/。使用 --region=china--mirror 时,Pig 与 Pigsty 都会为 PGDG YUM/DNF 和 APT 仓库首选该地址;YUM 定义保留 Pigsty 镜像作为兼容回退。全球 default 路由仍使用 PostgreSQL 官方仓库。

OS 系统代码 厂商 大版本 PG 大版本 备注
el7.x86_64
EL 7
18
17
16
15
14
EOL
el8.x86_64
EL 8
18
17
16
15
14
Near EOL
el8.aarch64
EL 8
18
17
16
15
14
Near EOL
el9.x86_64
EL 9
18
17
16
15
14
OK
el9.aarch64
EL 9
18
17
16
15
14
OK
el10.x86_64
EL 10
18
17
16
15
14
OK
el10.aarch64
EL 10
18
17
16
15
14
OK
d11.x86_64
Debian 11
18
17
16
15
14
EOL
d11.aarch64
Debian 11
18
17
16
15
14
EOL
d12.x86_64
Debian 12
18
17
16
15
14
OK
d12.aarch64
Debian 12
18
17
16
15
14
OK
d13.x86_64
Debian 13
18
17
16
15
14
OK
d13.aarch64
Debian 13
18
17
16
15
14
OK
u20.x86_64
Ubuntu 20
18
17
16
15
14
EOL
u20.aarch64
Ubuntu 20
18
17
16
15
14
EOL
u22.x86_64
Ubuntu 22
18
17
16
15
14
OK
u22.aarch64
Ubuntu 22
18
17
16
15
14
OK
u24.x86_64
Ubuntu 24
18
17
16
15
14
OK
u24.aarch64
Ubuntu 24
18
17
16
15
14
OK
u26.x86_64
Ubuntu 26
18
17
16
15
14
OK
u26.aarch64
Ubuntu 26
18
17
16
15
14
OK

EL YUM/DNF 仓库信息:

- { name: pgdg14         ,description: 'PostgreSQL 14'      ,module: pgsql   ,releases: [7,8,9,10]       ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-$releasever-$basearch' ,china: 'https://mirrors.cloud.tencent.com/postgresql/repos/yum/14/redhat/rhel-$releasever-$basearch https://repo.pigsty.cc/yum/pgdg/14/redhat/rhel-$releasever-$basearch' ,europe: 'https://mirrors.xtom.de/postgresql/repos/yum/14/redhat/rhel-$releasever-$basearch' }}
- { name: pgdg15         ,description: 'PostgreSQL 15'      ,module: pgsql   ,releases: [7,8,9,10]       ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://download.postgresql.org/pub/repos/yum/15/redhat/rhel-$releasever-$basearch' ,china: 'https://mirrors.cloud.tencent.com/postgresql/repos/yum/15/redhat/rhel-$releasever-$basearch https://repo.pigsty.cc/yum/pgdg/15/redhat/rhel-$releasever-$basearch' ,europe: 'https://mirrors.xtom.de/postgresql/repos/yum/15/redhat/rhel-$releasever-$basearch' }}
- { name: pgdg16         ,description: 'PostgreSQL 16'      ,module: pgsql   ,releases: [  8,9,10]       ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://download.postgresql.org/pub/repos/yum/16/redhat/rhel-$releasever-$basearch' ,china: 'https://mirrors.cloud.tencent.com/postgresql/repos/yum/16/redhat/rhel-$releasever-$basearch https://repo.pigsty.cc/yum/pgdg/16/redhat/rhel-$releasever-$basearch' ,europe: 'https://mirrors.xtom.de/postgresql/repos/yum/16/redhat/rhel-$releasever-$basearch' }}
- { name: pgdg17         ,description: 'PostgreSQL 17'      ,module: pgsql   ,releases: [  8,9,10]       ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://download.postgresql.org/pub/repos/yum/17/redhat/rhel-$releasever-$basearch' ,china: 'https://mirrors.cloud.tencent.com/postgresql/repos/yum/17/redhat/rhel-$releasever-$basearch https://repo.pigsty.cc/yum/pgdg/17/redhat/rhel-$releasever-$basearch' ,europe: 'https://mirrors.xtom.de/postgresql/repos/yum/17/redhat/rhel-$releasever-$basearch' }}
- { name: pgdg18         ,description: 'PostgreSQL 18'      ,module: pgsql   ,releases: [  8,9,10]       ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://download.postgresql.org/pub/repos/yum/18/redhat/rhel-$releasever-$basearch' ,china: 'https://mirrors.cloud.tencent.com/postgresql/repos/yum/18/redhat/rhel-$releasever-$basearch https://repo.pigsty.cc/yum/pgdg/18/redhat/rhel-$releasever-$basearch' ,europe: 'https://mirrors.xtom.de/postgresql/repos/yum/18/redhat/rhel-$releasever-$basearch' }}
- { name: pgdg19-beta    ,description: 'PostgreSQL 19 Beta' ,module: beta    ,releases: [  8,9,10]       ,arch: [x86_64, aarch64] ,baseurl: { default: 'https://download.postgresql.org/pub/repos/yum/testing/19/redhat/rhel-$releasever-$basearch' ,china: 'https://mirrors.cloud.tencent.com/postgresql/repos/yum/testing/19/redhat/rhel-$releasever-$basearch https://repo.pigsty.cc/yum/pgdg/testing/19/redhat/rhel-$releasever-$basearch' ,europe: 'https://mirrors.xtom.de/postgresql/repos/yum/testing/19/redhat/rhel-$releasever-$basearch' }}

Debian / Ubuntu APT 仓库信息:

- { name: pgdg           ,description: 'PGDG'               ,module: pgsql   ,releases: [11,12,13,22,24,26] ,arch: [x86_64, aarch64] ,baseurl: { default: 'http://apt.postgresql.org/pub/repos/apt/ ${distro_codename}-pgdg main'            ,china: 'https://mirrors.cloud.tencent.com/postgresql/repos/apt/ ${distro_codename}-pgdg main' }}
- { name: pgdg-beta      ,description: 'PGDG Beta'          ,module: beta    ,releases: [11,12,13,22,24,26] ,arch: [x86_64, aarch64] ,baseurl: { default: 'http://apt.postgresql.org/pub/repos/apt/ ${distro_codename}-pgdg-testing main 19' ,china: 'https://mirrors.cloud.tencent.com/postgresql/repos/apt/ ${distro_codename}-pgdg-testing main 19' }}

APT GPG

PGDG APT 仓库使用以下 GPG 密钥签名: B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 (ACCC4CF8)

MD5 校验和为 f54c5c1aa1329dc26e33b29762faaec4,详情参考 https://www.postgresql.org/download/linux/debian/

sudo curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc
. /etc/os-release
sudo sh -c "echo 'deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $VERSION_CODENAME-pgdg main' > /etc/apt/sources.list.d/pgdg.list"

使用腾讯云镜像时,可以直接获取同一份 PGDG APT 公钥:

sudo curl -fsSL https://mirrors.cloud.tencent.com/postgresql/repos/apt/ACCC4CF8.asc -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc
. /etc/os-release
sudo sh -c "echo 'deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://mirrors.cloud.tencent.com/postgresql/repos/apt/ $VERSION_CODENAME-pgdg main' > /etc/apt/sources.list.d/pgdg.list"

YUM GPG

PGDG YUM 仓库使用 https://ftp.postgresql.org/pub/repos/yum/keys/ 中的一系列密钥进行签名。请自行按需选取使用

Last updated on