开发者

Postgresql compiled from source versus ubuntu package

What are the advantages/disadvantages of using postgresql compiled from source compared to the ubuntu postgresql package? Which of the开发者_StackOverflow社区 two are recommended to be used on a live production environment?

Thanks in advance.


I'd recommend distribution provided package over self-compiled one. You'll get automatic security updates from your distribution, sane file locations and ability to verify or restore files using your package manager. You'll be able to rollback failed update fast using old package, etc.

If you'll compile yourself you'll have to very often check if there is new version available with security updates, you'll forget what options did you use for compilation and if you mismatch them then an update can make your data unreadable. You won't be available (on vacation) when new security update is published and your update will be late. Or you'll forget to update at all. You're lazy and you'll have to work more.


I know this is an old question, but there is one very real advantage to building from source. If you find a bug, submit it to the pg mailing lists, and get a patch you can apply it within a few hours, easily. I know this, because I've done it twice in the last two years in production.


The only advantage with compiling it yourself is that you could optimize the build yourself with different features and/or compiling modes. But on the other hand this means your build is much less tested then one distribution via the package system. So doing it yourself might end up not being so great. Plus updating/redoing it as Tometzky mentioned, end up being a lot more work. Unless it's very needed to build it yourself, then don't. (this is not specific to postgresql, but everything in a production environment)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜