pg_activity icon indicating copy to clipboard operation
pg_activity copied to clipboard

Fix startup error for managed databases

Open kmoppel-cognite opened this issue 3 years ago • 1 comments

To get around cases where pidfile is kept outside of data directory. On managed Google Cloud SQL getting for example: FileNotFoundError: [Errno 2] No such file or directory: '/pgsql/data/postmaster.pid'

kmoppel-cognite avatar Oct 07 '22 12:10 kmoppel-cognite

Thanks for reporting this. Will have a look next week.

blogh avatar Oct 07 '22 13:10 blogh

hi @kmoppel-cognite, does #324 fixes the problem for you ? If so I prefer to do it that way.

blogh avatar Oct 14 '22 07:10 blogh

This PR fixes the error I was getting as well. the change in #324 changes the startup error to

File "/opt/homebrew/lib/python3.10/site-packages/pgactivity/data.py", line 175, in pg_is_local_access

basejump avatar Nov 13 '22 22:11 basejump

@basejump : Hi thanks for testing, can you give me the full stack trace ?

blogh avatar Nov 17 '22 12:11 blogh

@basejump

This PR fixes the error I was getting as well. the change in #324 changes the startup error to

File "/opt/homebrew/lib/python3.10/site-packages/pgactivity/data.py", line 175, in pg_is_local_access

With #324 Line 175 is a try: statement, so I doubt it would be reported in a traceback. Please report the full traceback and commit id you're using.

dlax avatar Nov 17 '22 13:11 dlax

The fix was merge a while ago. Feel free to reopen if you see a problem related to this again. Thanks for taking the time to make a PR & post here.

blogh avatar Mar 15 '23 12:03 blogh