sorintlab / stolon

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

How to debug the program? #899

Closed zimu312500 closed 1 year ago

zimu312500 commented 1 year 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 1 year ago

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