跳到主要内容

code-server调试postgresql

搭建环境

  1. 搭建code-server
docker pull ghcr.io/growdu/oh-my-code/coder:v1.4
  1. 启动code-server
git clone https://github.com/growdu/oh-my-code.git
cd oh-my-code
docker-compose up -d
  1. 登录code-server

  2. 下载postgresql源码

git clone git://git.postgresql.org/git/postgresql.git
  1. 安装c语言插件

这里下载插件安装。

编译postgresql

./configure --prefix=`pwd`/debug --enable-debug CFLAGS='-O0 -g'
make world -j 8
make install-world

编译完成后如下:

➜  postgresql git:(REL_12_STABLE)ls debug 
bin include lib share

运行postgresql

./initdb -A trust data
./pg_ctl -D data -l logfile start