postgresql 我可以安装 pg_dump 而不在 Alpine 上安装 postgres 吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40628472/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can I install pg_dump without installing postgres on Alpine?
提问by Oleg
I have tried to install pg_dump
as part of installation of postgres-client
, however it does not include pg_dump
.
我尝试将安装pg_dump
作为 安装的一部分postgres-client
,但它不包括pg_dump
.
Can pg_dump
be installed without a full installation of postgres on Alpine Linux?
可以pg_dump
在 Alpine Linux 上不完整安装 postgres 的情况下安装吗?
回答by Lee Benson
No - to install pg_dump
and associated utilities, you'll need to run apk add postgresql
, which will install the full PostgreSQL suite.
否 - 要安装pg_dump
和关联实用程序,您需要运行apk add postgresql
,这将安装完整的 PostgreSQL 套件。
The installed size is currently 12.1mb (for v9.6.0-r1) vs just 451kb for postgresql-client
, so it's definitely bigger. If you're using Alpine in Docker, that might not be a big deal. If you're using it in an embedded device where size matters, you could simply copy over pg_dump
or whatever else you need.
安装的大小目前是 12.1mb(对于 v9.6.0-r1),而对于 451kb postgresql-client
,所以它肯定更大。如果您在 Docker 中使用 Alpine,那可能没什么大不了的。如果您在尺寸很重要的嵌入式设备中使用它,您可以简单地复制pg_dump
或任何您需要的东西。