sorintlab / stolon

PostgreSQL cloud native High Availability and more.
https://talk.stolon.io
Apache License 2.0
4.66k stars 447 forks source link

How to debug the program? #899

Closed zimu312500 closed 2 years ago

zimu312500 commented 2 years ago
   The pg command should run as nonroot,also the stolon program should run as nonroot,so how can I debug the program whith dlv?When I use sudo -u postgres dlv to debug the program , it's could not run normal.If I use root to run the program,returns this error "cannot get instance state: exit status 1"  when to execute the cmd "pc_ctl status -D /data/stolon_data/postgres".
zimu312500 commented 2 years ago

Solved.I use nonroot account to debug the program and the pg command return right.