Skip to content

Latest commit

 

History

History
116 lines (76 loc) · 4.33 KB

20230331_05.md

File metadata and controls

116 lines (76 loc) · 4.33 KB

PostgreSQL git.postgresql.org 分支使用 - 如何同步社区最新patch?

作者

digoal

日期

2023-03-31

标签

PostgreSQL , PolarDB , git.postgresql.org , 分支


背景

postgresql git里的STABLE 指对应版本的稳定分支. 更新比较频繁, 如果你想合并最新的patch, 可以使用git的stable分支. 如果你想试用最新开发版的功能可以使用master分支.

如果你想基于postgresql开发下游产品, 建议使用master分支与stable分支的交叉点的代码快照, 因为这个点位既在master上, 又在某个stable的起点上, 未来升级到大版本比较方便:

《基于开源版本的发型版如何保持与开源版本的同步? - 路口》

demo

https://git.postgresql.org/gitweb/?p=postgresql.git;a=summary

description	  
This is the main PostgreSQL git repository.  
  
owner	  
Magnus Hagander  
  
last change	Fri, 31 Mar 2023 02:48:01 +0000 (19:48 -0700)  
  
URL	  
git://git.postgresql.org/git/postgresql.git  
https://git.postgresql.org/git/postgresql.git  
ssh://git@git.postgresql.org/postgresql.git  
heads  
35 min ago	master	shortlog | log | tree  
4 hours ago	REL_11_STABLE	shortlog | log | tree  
4 hours ago	REL_12_STABLE	shortlog | log | tree  
4 hours ago	REL_13_STABLE	shortlog | log | tree  
4 hours ago	REL_14_STABLE	shortlog | log | tree  
4 hours ago	REL_15_STABLE	shortlog | log | tree  
2 months ago	REL9_2_STABLE	shortlog | log | tree  
2 months ago	REL9_3_STABLE	shortlog | log | tree  
2 months ago	REL_10_STABLE	shortlog | log | tree  
2 months ago	REL9_4_STABLE	shortlog | log | tree  
2 months ago	REL9_5_STABLE	shortlog | log | tree  
2 months ago	REL9_6_STABLE	shortlog | log | tree  
6 years ago	REL9_1_STABLE	shortlog | log | tree  
7 years ago	REL9_0_STABLE	shortlog | log | tree  
8 years ago	REL8_2_STABLE	shortlog | log | tree  
8 years ago	REL8_3_STABLE	shortlog | log | tree  
...  

1、下载某个分支, 例如 REL_15_STABLE :

git clone --depth 1 -b REL_15_STABLE https://git.postgresql.org/git/postgresql.git  

2、同步分支

cd postgresql/  
  
git pull origin REL_15_STABLE  

3、基于该分支安装

cd postgresql/  
./configure --prefix=/root/pg15  
make -j 4  
make install  

4、清除安装痕迹后可以继续同步该分支的社区最新的patch

cd postgresql/  
make clean  
make distclean  
  
git pull origin REL_15_STABLE  

digoal's wechat