heroku-pg-extras
heroku-pg-extras copied to clipboard
command pg:bloat fails (on windows)
ERROR: syntax error at or near ";"
RAD 3: SELECT current_setting('block_size');numeric AS bs...
That seems to point to this line but the SQL text in the error does not match that line (and I can't reproduce). Are you running the latest version (run heroku plugins:update heroku-pg-extras
to make sure)?
C:\metagamerscore>heroku plugins:update heroku-pg-extras
Updating heroku-pg-extras... done
C:\metagamerscore>heroku pg:bloat
ERROR: syntax error at or near ";"
RAD 3: SELECT current_setting('block_size');numeric AS bs...
^
C:\metagamerscore>
Same thing... odd... like the :: is converted to ; somehow
Perhaps not coincidentally, the windows path separator is ;
, no? Do other queries that use ::
work for you, like pg:index-usage
or pg:long-running-queries
?
Both pg:index-usage and pg:long-running-queries execute fine.
Can you give this branch a shot? The easiest way to do that is to find your heroku config (on OS X and Linux, this is in ~/.heroku
; I'm not sure where it'd be on Windows--perhaps %APP_DATA%
?), go to the plugins/heroku-pg-extras
subdirectory, run git remote update, and then git checkout origin/windows-pgbloat-fix-maybe
.
Trying this new branch gave me a different error:
ERROR: syntax error at or near "" RAD 15: SELECT 1+count(*)\8
I still have the same issue in windows. I get this error "could not find a "psql" to execute". I even reinstalled both heroku and postgres on paths that don't have a space in them. Any help is much appreciated.
does psql
work?
Yes psql works. I have been copy pasting the queries from bloat.js, index_usage.js to psql to get the statistics.
in fact pg:psql works
@arunbhat can you post the full error you are getting now? And the output of heroku version
?
Here you go:
C:\Users\abhat>heroku pg:bloat database --app revvy-gpm-sandbox could not find a "psql" to execute
C:\Users\abhat>heroku version heroku/toolbelt/3.43.9 (i386-mingw32) ruby/2.1.7 heroku-cli/5.2.34-65b16c9 (windows-386) go1.6.2 === Installed Plugins [email protected]
I didn't test, but I think this will fix it https://github.com/heroku/heroku-pg/pull/13