Planet PostgreSQL Planet PostgreSQL -

Jeremy Schneider: Copy-and-Paste A New Postgres Dev Env In 5 Min

You can cut-and-paste the following commands to quickly get a new & clean dev environment for working with PostgreSQL source code. This includes Michael Paquier’s powerful script kit for managing the PostgreSQL development environment. Setting up from scratch takes me about 5 minutes, plus 3 minutes to configure, compile and install PostgreSQL for testing. Running the full PostgreSQL test suite (including TAP tests) took me 13 minutes. This is a quick and very easy way for anyone to try out a patch from the hacker’s mailing list, if you want to check whether it fixes a bug you’re encountering, or if you want to try out a new feature that’s currently under development. One advantage of using a reproducible fresh Ubuntu instance is that there’s a lot less risk of getting side-tracked troubleshooting random build issues from quirks that accumulate over time on your laptop or other long-term local development environment. Operating system configuration, package & dependency versions… I’ve seen lots of unexpected weird things mess with local builds of PostgreSQL. Free-tier eligible EC2 t2.micro instance with Ubuntu LTS. For information about Microsoft Azure and Google Compute Engine, see the Notes section at the end of this article. I expect these steps to work largely unmodified as long as it’s the same Ubuntu LTS. This assumes you have already installed the AWS CLI and created your EC2 key pair, which is pretty quick and easy. See https://aws.amazon.com/cli/ and https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html Short Version / Quick Start 1 Start an instance with Ubuntu 22.04 LTS KEY=jeremy-mb (use your EC2 key pair name) aws ec2 run-instances --region us-east-1 --key-name $KEY --instance-type t2.micro --tag-specifications "ResourceTyp[...]

本文介绍了如何快速设置干净的PostgreSQL开发环境,包括配置、编译和安装。作者建议使用可复制的Ubuntu实例来避免本地开发环境问题。还分享了有用的链接和命令。

PostgreSQL postgres 安装 开发环境 编译 配置

相关推荐 去reddit讨论